Julian Date

hyp527

Registered User.
Local time
Today, 08:17
Joined
Jan 17, 2009
Messages
27
I want to write an auto calculation date like >=DateAdd("m",-6, Date()) but the dates are divided out in such columns:

cc - century - 20
yy - year - 9
mm - month - 2
dd - day - 4

Is there solution to mimic the >=DateAdd("m",-6, Date()) ? Concatination would not work in this case since there's too many records.

Any suggestion?

Thanks!
 
Hi -

To begin with, the thing you describe is absolutely NOT a Julian Date. Suggest you do a Google on Julian Date.

To convert that monster (gotta ask, 'Why would anyone want to do this?') to something people can work with, you can
create a calculated field in a query.

Example:

Code:
cc = 20
yy = 9
mm = 2
dd = 4

[B]x =  cdate(mm & "/" & dd & "/" & cc & format(yy, "00"))[/B]

- or -

[B]y = cdate(mm & "/" & dd & "/" & (100 * cc) + yy)[/B]

- either will work -

? x 
2/4/2009 

To show that this in date/time data format:
? cdbl(x)
 39848

Given this, place your >=DateAdd("m",-6, Date()) in the criteria cell of the calculated field.

HTH - Bob
 
Last edited:
Thanks Bob. I ask the same question myself.
 

Users who are viewing this thread

Back
Top Bottom