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 .
=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')
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
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.