Solved

Created Time in Generic Inquiry

  • 7 April 2021
  • 4 replies
  • 1213 views

Userlevel 4
Badge

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 .

icon

Best answer by Gabriel Michaud 8 April 2021, 15:28

View original

4 replies

Userlevel 7
Badge +10

@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')

 

Userlevel 4
Badge

@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 7
Badge +10

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

Userlevel 4
Badge

@Gabriel Michaud  do you know if there’s a better way to accomplish this now than there was 2 years ago?

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 — 2024  Acumatica, Inc. All rights reserved