Pulling a date from a two digit year and julian date

  • Thread starter Thread starter Ziggs
  • Start date Start date
Z

Ziggs

I have a field with an event number (EventNo). Example, 06-001-019.
06 is for the year, 001 represents the julian date for January 1st,
and 019 for the event of the day. My goal is to create a query that
will display the date of the event automatically based on the year and
julian date that's already in the EventNo. Any ideas? TIA
 
Take a look at the DateSerial() and DateAdd() functions. It sounds to me
like you want to add the julian portion to the "zero-th" day of the year.
You can use the Left(), Mid() and Right() functions to extract the portions
you want.

--
Regards

Jeff Boyce
Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

Microsoft Registered Partner
https://partner.microsoft.com/
 
I have a field with an event number (EventNo). Example, 06-001-019.
06 is for the year, 001 represents the julian date for January 1st,
and 019 for the event of the day. My goal is to create a query that
will display the date of the event automatically based on the year and
julian date that's already in the EventNo. Any ideas? TIA

Assuming all your events are in this century, try

DateSerial(2000 + CLng(Left([EventNo], 2)), 1, CLng(Mid([EventNo], 4,
3))


John W. Vinson[MVP]
 
Perfect!!!

I have a field with an event number (EventNo). Example, 06-001-019.
06 is for the year, 001 represents the julian date for January 1st,
and 019 for the event of the day. My goal is to create a query that
will display the date of the event automatically based on the year and
julian date that's already in the EventNo. Any ideas? TIA

Assuming all your events are in this century, try

DateSerial(2000 + CLng(Left([EventNo], 2)), 1, CLng(Mid([EventNo], 4,
3))


John W. Vinson[MVP]
 
Back
Top