I have a table that has a year field and day field. I only need to convert
the day field which is a Julian date to Gregorian. If possible in a query. If
not then in a module, but, I'm real rusty with access so please give explicit
instructions. I have found some codes but have not been able to make them
work with the table, I'm sure its me.
Thanks for any help you can provide me with.
Wayne-I-M - 28 Feb 2008 21:35 GMT
There are loads of examples out there. The simplist one I could find that
works is
SELECT DatePart("y",[TableName]![FieldName])+(Year(Now())-1900)*1000 AS
NewDate
FROM TableName;

Signature
Wayne
Manchester, England.
> I have a table that has a year field and day field. I only need to convert
> the day field which is a Julian date to Gregorian. If possible in a query. If
[quoted text clipped - 3 lines]
>
> Thanks for any help you can provide me with.
Rusty11 - 29 Feb 2008 15:00 GMT
I tried this and for 22 as in the day field I got a return of 108022. What I
was expecting back was for a Julian day of 22 a return month and day like
0122 or Jan 22, or some formonth and day. Sorry, I should have mentioned this
in my first post.
> There are loads of examples out there. The simplist one I could find that
> works is
[quoted text clipped - 10 lines]
> >
> > Thanks for any help you can provide me with.
KARL DEWEY - 28 Feb 2008 21:36 GMT
>>I only need to convert the day field which is a Julian date to Gregorian.
Your wording does not match. A 'Julian date' implies some format of year
and numerical day count within that year.
There are many such formats like --
8059 which is the 59th day of 2008.
OR
08059
What is the DataType of the fields - text or number?

Signature
KARL DEWEY
Build a little - Test a little
> I have a table that has a year field and day field. I only need to convert
> the day field which is a Julian date to Gregorian. If possible in a query. If
[quoted text clipped - 3 lines]
>
> Thanks for any help you can provide me with.
Ron2006 - 29 Feb 2008 14:12 GMT
Some examples of what you want to convert would help.
Rusty - 29 Feb 2008 14:45 GMT
Here is a part of the table I'm working with.
YR DAY TIME DIC RIC CIIC FSC
2005 275 XXXXXXX A41 XXX X XXXX
2005 275 XXXXXXX A4A XXX X XXXX
2005 275 XXXXXXX A41 XXX X XXXX
2005 275 XXXXXXX A4A XXX X XXXX
2005 275 XXXXXXX A4A XXX X XXXX
> Some examples of what you want to convert would help.
KARL DEWEY - 29 Feb 2008 18:41 GMT
Try this --
CVDate("1/1/" & [YR])-1+[DAY]

Signature
KARL DEWEY
Build a little - Test a little
> Here is a part of the table I'm working with.
>
[quoted text clipped - 6 lines]
>
> > Some examples of what you want to convert would help.
John W. Vinson - 29 Feb 2008 21:00 GMT
>Try this --
> CVDate("1/1/" & [YR])-1+[DAY]
or (almost equivilantly) DateSerial([Yr], 1, [DAY])

Signature
John W. Vinson [MVP]
Rusty - 29 Feb 2008 14:36 GMT
both the day field in question is in number format.
> >>I only need to convert the day field which is a Julian date to Gregorian.
> Your wording does not match. A 'Julian date' implies some format of year
[quoted text clipped - 12 lines]
> >
> > Thanks for any help you can provide me with.