Determine date given Day of year and year. (1 Viewer)

pickslides

Red Sails In The Sunset
Local time
Today, 14:56
Joined
Apr 29, 2008
Messages
76
I have fields [DayOfYear] and [Year] can I somehow produce the dd/mm/yyyy from this. I know how to do it in Excel but the Asscess function Date() is a little different.

I.e. if [DayOfYear] =152, [Year] = 2014 then [Date] = 2/6/2014

MQ
 

GinaWhipp

AWF VIP
Local time
Today, 00:56
Joined
Jun 21, 2011
Messages
5,899

Galaxiom

Super Moderator
Staff member
Local time
Today, 14:56
Joined
Jan 20, 2009
Messages
12,852
Code:
DateAdd("d", [DayOfYear], DateSerial([yearfield],1,0))
 

Brianwarnock

Retired
Local time
Today, 05:56
Joined
Jun 2, 2003
Messages
12,701
Why two function calls won't

Dateserial([yearfield],1,[dayofyear])

Do the trick?

Sorry can't test haven't got Access any more

Brian
 

namliam

The Mailman - AWF VIP
Local time
Today, 06:56
Joined
Aug 11, 2003
Messages
11,695
Brian is right,
?dateserial(2014,1,152)
01-JUN-2014
or
?dateserial(2014,1,0) + 152
01-JUN-2014
 

Users who are viewing this thread

Top Bottom