Using Date and Time in EP

This forum allows users to post and respond to "How Do I Do ....." questions. The information contained in this forum has not been validated by K-Rise Systems and, as such, K-Rise Systems cannot guarantee the accuracy of the information.
Post Reply
SumanPrasad
Posts: 88
Joined: August 26th, 2021, 5:21 pm
Contact:

Using Date and Time in EP

Unread post 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 6040 times
Tenant Settings.png
Tenant Settings.png (37.39 KiB) Viewed 6040 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 6040 times
Named Time Zones.png
Named Time Zones.png (54.67 KiB) Viewed 6040 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 424 times
Date Time Services.xml
(98.71 KiB) Downloaded 424 times
Display Current Date to User
Display Current Date.png
Display Current Date.png (78.53 KiB) Viewed 6040 times
Display Current Date.png
Display Current Date.png (78.53 KiB) Viewed 6040 times
Converting DisplayDate to SystemDate
Convert Display to System Date.png
Convert Display to System Date.png (110.49 KiB) Viewed 6040 times
Convert Display to System Date.png
Convert Display to System Date.png (110.49 KiB) Viewed 6040 times
Converting DisplayDate to JDEDate
Convert Display to JDE Date.png
Convert Display to JDE Date.png (109.01 KiB) Viewed 6040 times
Convert Display to JDE Date.png
Convert Display to JDE Date.png (109.01 KiB) Viewed 6040 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 6040 times
Current Date To Database.png
Current Date To Database.png (38.67 KiB) Viewed 6040 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 6040 times
Current DateTime in Pacific Time Zone.png
Current DateTime in Pacific Time Zone.png (96.83 KiB) Viewed 6040 times
word count: 435

Tags:
JustinVanRegenmorter
Posts: 576
Joined: August 26th, 2021, 9:56 am
Contact:

Re: Using Date and Time in EP

Unread post by JustinVanRegenmorter »

Important Date Time changes in EP can be found here.
word count: 10
Post Reply