# JULCVT
> [HTML Version](julcvt_sbr.htm)
_Updated September 2017_
**xcall JULCVT, sepdat, juldat, flag \{,status\}**
JULCVT converts between a separated date format and Julian date format.
**Parameters**
sepdate ([Num](num.htm.md)) \[in/out\]
is the date to convert to Julian (if _flag_ = 0), or the return date (if _flag_ = 1). It is in AMOS "separated" format, typically mapped as follows:
MAP1 sepdate,B,4
MAP1 sepdateX,@sepdate
MAP2 mon,B,1 \! Month (1-12)
MAP2 day,B,1 \! Day of month (1-31)
MAP2 yr,B,1 \! Offset from 1900 (2023=123)
MAP2 dow,B,1 \! Day of week (Mon=0, Sun=6)
Note that sepdate can be of any numeric type large enough to hold a 32 bit integer, but you would need to assign it to an overlay as in the map statements above in order to easily split out the individual fields.
_juldat_ ([Num](num.htm.md))
is the Julian date equivalent of _sepdate_ (if _flag_ = 0) or the date to convert to separated format (if _flag_ = 1). This is the number of days since "The Beginning" (about 4716 BC).
_flag _([Num](num.htm.md)) \[in\]
should be set to 0 to convert from _sepdate_ to _juldat_, else 1 to convert the other way.
_status _([Num](num.htm.md)) \[out\]
returns 0 in all cases. This is essentially a dummy variable here to match a legacy version of this routine under AMOS.
**Comments**
The BASIC system variable DATE can be used to set _sepdat _to the current date (i.e. sepdat = DATE).
**See Also**
• [GRECNV](grecnv_sbr.htm.md) and [DATES](datessbr.htm.md) for other date conversion routines.