Using Date and Time in EP
Posted: September 1st, 2021, 2:17 pm
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. 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.
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. Display Current Date to User Converting DisplayDate to SystemDate Converting DisplayDate to JDEDate 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. Getting Current Date in Pacific Time
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. 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.
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. Display Current Date to User Converting DisplayDate to SystemDate Converting DisplayDate to JDEDate 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. Getting Current Date in Pacific Time