converting julian Date to Database date

H

holeshot

I need to know what formula to Use to Convert a Julian date - example:
"2006212" with a 4 digit year,
to a Database Date format - Example "20060823" with YYYY,MM,DD

Thanks in advance for your Help!
 
H

holeshot

The Julian Date for Jan 2, 2007 would show as "2007002" and the date format I
want to Convert it to is "20070102
 
T

Terry Kreft

Using your example it would be something like

FORMAT(dateadd("d",mid("2006212",5),dateserial(left("2006212",4),1,0)),"yyyy
mmdd")

which comes out as 20060731..
 
H

holeshot

Thanks Terry, that worked out great for me, Just what I was needing,

THanks Again!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top