Salesforce

How Do I Calculate a Julian Date? (Magic xpi 4.5)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

How Do I Calculate a Julian Date? (Magic xpi 4.5)

When wanting to integrate with JD Edwards, using a special type of Julian date, which converts all dates to six digits, is often a requirement. Magic xpi lets you calculate the JD Edwards type of Julian date, making it simple to use the Magic xpi JD Edwards Enterprise One and JD Edwards World connectors. For this purpose, Magic xpi offers four functions: DateTimeFormat, GetDate, GetTime, or GetTimeZone.

You can find details about the syntax of each of these functions in the How Do I Calculate an XML DateTime Format? topic.

The functions work in the same way, but in the format parameter, you enter 2, which means that you want the function to return a Julian Date value. The format for this type of Julian date is CYYDDD, where C is the century (0=1900 and 1=2000), YY is the year and DDD the day of the year. So, 111081 would be 1 for the century, 11 for the year (2011) and 081 for the 81th day of the year.

Here, we’ll show you some examples of the functions.

Expression

Result

DateTimeFormat('22/03/2011'Date, '','',2)

111081

GetDate('111081',2)

2011/03/22

GetTime('111081',2)

10:45:30

GetTimeZone('111081',2)

+5:30

Reference
Attachment 
Attachment