JULDAT: Converting From Gregorian to Julian Format

How to:

The JULDAT function converts a date from Gregorian format (year-month-day) to Julian format (year-day). A date in Julian format is a five- or seven-digit number. The first two or four digits are the year; the last three digits are the number of the day, counting from January 1. For example, January 1, 1999 in Julian format is either 99001 or 1999001.


Top of page

x
Syntax: How to Convert From Gregorian to Julian Format
JULDAT(indate, output)

where:

indate

I6, I8, I6YMD, I8YYMD

Is the legacy date to convert.

output

I5 or I7



Example: Converting From Gregorian to Julian Format

GREGDT converts JULIAN to YYMD (Gregorian) format. It determines the century using the default DEFCENT and YRTHRESH parameter settings. The result is stored in a column with the format I8.

GREGDT(JULIAN, 'I8')

For 82213, the result is 19820801.

For 82004, the result is 19820104.


iWay Software