Question

Created Time in Generic Inquiry


Has anyone been able to take the shipment (or another similar transaction) created date/time field and only display the time? I was able to use the CRCase table trick to get the date column to display the date and time, but the client would like the time in a separate column. When I try to take the right most characters from the field, it displays the time in UTC time instead of our current time zone like the date/time field displays .


3 replies

Userlevel 5
Badge +3

@hayleehicks18 not very elegant but that works:

=CSTR(PADLEFT(HOUR([SOShipment.CreatedDateTime]),2,'0'))+'h'+PADLEFT(CSTR(MINUTE([SOShipment.CreatedDateTime])),2,'0')

It will display time in 24H format. 12H display could be achieved with an IIF Statement:

=IIF(HOUR([SOShipment.CreatedDateTime])<=12,PADLEFT(CSTR(HOUR([SOShipment.CreatedDateTime])),2,'0')+'h'+PADLEFT(CSTR(MINUTE([SOShipment.CreatedDateTime])),2,'0')+ ' AM',PADLEFT(CSTR(HOUR([SOShipment.CreatedDateTime])-12),2,'0')+'h'+PADLEFT(CSTR(MINUTE([SOShipment.CreatedDateTime])),2,'0')+ ' PM')

 

@Gabriel Michaud Hi Gabriel! Thanks for the response. Do you know how I could get it to display in the same time zone conversion as the created on displays? The formula displays the time in UTC time. Also daylight savings may be a factor here. See below. Thanks for your help!

 

 

Userlevel 5
Badge +3

No easy way i’m afraid. It would be great if Acumatica simply exposed the time as an extra field, just like you can get the hour by appending _Hour to the field name: SOShipment.CreatedDateTime_Hour 

Two possible options:

Option 1: just shift the hour manually by adding/subtracting from the UTC time. This will not take care of daylight savings or users in different time zones

Option 2: through customization create a field with a special attribute that takes care of the formatting; you would then be able to use this field as schema field in any GI

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2020  Acumatica, Inc. All rights reserved