Page 1 of 1

Using Date and Time in EP

Posted: September 1st, 2021, 2:17 pm
by SumanPrasad
Setup timezone and culture in tenant settings.
Tips: It is recommended that you use the same time zone as JD Edwards or your ERP. Culture helps set display format for date and time.
Tenant Settings.png
Tenant Settings.png (37.39 KiB) Viewed 4943 times
Tenant Settings.png
Tenant Settings.png (37.39 KiB) Viewed 4943 times
Named time zone: A predefined name with time zone and format.
SystemDate and SystemDateTime
This will be used for saving date and time in the database. Standard format is : yyyy-MM-dd HH:mm:ss.fff and yyyy-MM-dd.
DisplayDate and DisplayDateTime
This will be used for display purposes only. Standard format is Culture.LongDatePattern and Culture.ShortDatePattern. It is recommended to use default culture settings.
JDEDate and JDETime
JDE julian format for date and JDE Time (HHmmss).

You can add your own named time zones. Say you have a job maintenance system that is in a different timezone which uses dd/MM/yyyy format. You can add ‘JobMaintDate’ and ‘JobMainDateTime’ and use that particular time zone and formats.
Named Time Zones.png
Named Time Zones.png (54.67 KiB) Viewed 4943 times
Named Time Zones.png
Named Time Zones.png (54.67 KiB) Viewed 4943 times
Tip: In every date time service, you will see the time zone as input. If you leave this blank, it will default to the tenant time zone.

Examples:

Upload following method to your project to see it in action.
Date Time Services.xml
(98.71 KiB) Downloaded 267 times
Date Time Services.xml
(98.71 KiB) Downloaded 267 times
Display Current Date to User
Display Current Date.png
Display Current Date.png (78.53 KiB) Viewed 4943 times
Display Current Date.png
Display Current Date.png (78.53 KiB) Viewed 4943 times
Converting DisplayDate to SystemDate
Convert Display to System Date.png
Convert Display to System Date.png (110.49 KiB) Viewed 4943 times
Convert Display to System Date.png
Convert Display to System Date.png (110.49 KiB) Viewed 4943 times
Converting DisplayDate to JDEDate
Convert Display to JDE Date.png
Convert Display to JDE Date.png (109.01 KiB) Viewed 4943 times
Convert Display to JDE Date.png
Convert Display to JDE Date.png (109.01 KiB) Viewed 4943 times
Saving Current Date to database
Tips: You should use SystemDate format to store information like invoice date or order date. SystemDateTime should be used to store timestamp/audit information such as CreatedOn, UpdateOn etc.
Get CurrentDate with Format = SystemDate and SystemDateTime and save to the database column OrderDate and CreatedOn.
Current Date To Database.png
Current Date To Database.png (38.67 KiB) Viewed 4943 times
Current Date To Database.png
Current Date To Database.png (38.67 KiB) Viewed 4943 times
Getting Current Date in Pacific Time
Current DateTime in Pacific Time Zone.png
Current DateTime in Pacific Time Zone.png (96.83 KiB) Viewed 4943 times
Current DateTime in Pacific Time Zone.png
Current DateTime in Pacific Time Zone.png (96.83 KiB) Viewed 4943 times

Re: Using Date and Time in EP

Posted: April 21st, 2023, 11:36 am
by JustinVanRegenmorter
Important Date Time changes in EP can be found here.