Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Convert Julian Date to mm/dd/yyyy

1,469 views
Skip to first unread message

K

unread,
Oct 16, 2009, 9:06:01 AM10/16/09
to
Good day,

I have a query where the user enters the Julian date for example 09289 which
equates to 10/16/2009. 09 being the year and 289 being the number of days in
the year. Any help would be appreciated.

Thanks in advance.

K

unread,
Oct 16, 2009, 9:10:01 AM10/16/09
to

Forgot to add my question. How can convert the julian date in a query to the
format 10/16/2009

vanderghast

unread,
Oct 16, 2009, 9:30:53 AM10/16/09
to
DateAdd("d", 289, DateSerial( whichYear, 1, 0 ))


should return the date of the 289th day of the year whichYear.

So

( 09289 MOD 1000) + DateSerial( 09289 \ 1000, 1, 0)

should do.


(replace 09289 by the variable holding the NUMERICAL julian date, to be
generic)


Vanderghast, Access MVP


"K" <K...@discussions.microsoft.com> wrote in message
news:450E9CC9-1F44-47D5...@microsoft.com...

John Spencer

unread,
Oct 16, 2009, 9:47:58 AM10/16/09
to
You could try using an expression like the following to do the conversion

DateSerial(Left([JulianField],2),1,Right([JulianField],3))

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

K

unread,
Oct 16, 2009, 10:58:01 AM10/16/09
to
Worked. Thank you!!

Sarah Vandrey

unread,
Nov 22, 2010, 12:53:00 PM11/22/10
to
John, thank you for the excellent formula! It worked like a charm!

> On Friday, October 16, 2009 9:06 AM K wrote:

> Good day,
>
> I have a query where the user enters the Julian date for example 09289 which
> equates to 10/16/2009. 09 being the year and 289 being the number of days in
> the year. Any help would be appreciated.
>
> Thanks in advance.


>> On Friday, October 16, 2009 9:10 AM K wrote:

>> Forgot to add my question. How can convert the julian date in a query to the
>> format 10/16/2009
>> "K" wrote:


>>> On Friday, October 16, 2009 9:30 AM vanderghast wrote:

>>> DateAdd("d", 289, DateSerial( whichYear, 1, 0 ))
>>>
>>>
>>> should return the date of the 289th day of the year whichYear.
>>>
>>> So
>>>
>>> ( 09289 MOD 1000) + DateSerial( 09289 \ 1000, 1, 0)
>>>
>>>
>>>
>>> should do.
>>>
>>>
>>> (replace 09289 by the variable holding the NUMERICAL julian date, to be
>>> generic)
>>>
>>>
>>>
>>>
>>> Vanderghast, Access MVP


>>>> On Friday, October 16, 2009 9:47 AM John Spencer wrote:

>>>> You could try using an expression like the following to do the conversion
>>>>
>>>> DateSerial(Left([JulianField],2),1,Right([JulianField],3))
>>>>
>>>> John Spencer
>>>> Access MVP 2002-2005, 2007-2009
>>>> The Hilltop Institute
>>>> University of Maryland Baltimore County
>>>>
>>>> K wrote:


>>>>> On Friday, October 16, 2009 10:58 AM K wrote:

>>>>> Worked. Thank you!!
>>>>>
>>>>> "vanderghast" wrote:


>>>>> Submitted via EggHeadCafe
>>>>> Fill out blank PDF form online and stream to browser with iTextSharp
>>>>> http://www.eggheadcafe.com/tutorials/aspnet/a5e1109d-03bc-4e6b-a904-af4835f336cd/fill-out-blank-pdf-form-online-and-stream-to-browser-with-itextsharp.aspx

0 new messages