Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert to Julian Date and add leading zeros in one query

Status
Not open for further replies.

JustATheory

IS-IT--Management
Feb 27, 2003
115
US
When converting to the Julian date I need it to be in a three digit format with leading zeros. I need it to be in a field not a report as this data is passed to a vendor in a file and that is the requirements. I'd like to do it in one query, if possible. The below query gives me the correct Julian date, I've tried adding ,"000" to the function with no luck. Any help is appreciated.

SELECT date.Date, Format([date],"y") AS Julian
FROM [date];
 
Hi,

Did you try embedding one format statement within another? e.g.
Code:
Format(Format([Date],"y"),"000")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top