Need to convert Julian Day to Gregorian date

R

rusty11

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.
 
W

Wayne-I-M

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;
 
K

KARL DEWEY

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?
 
R

Rusty

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
 
R

Rusty11

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.

Wayne-I-M said:
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;


--
Wayne
Manchester, England.



rusty11 said:
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.
 

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