I'm not even trying to figure out your dateserial stuff. Rather, you
can use: format(date,"y") to get the proper Julian Date. Today is
36, btw.
As far as DateAdd, i think the help pretty much says it all. There
are different ways to increase/decrease a given date.
DateAdd (Interval, Number, Date)
Interval can be:
yyyy Year
q Quarter
m Month
y Day of year
d Day
w Weekday
ww Week
h Hour
n Minute
s Second
Number is items to add/subtract (you can subtract with a - number)
Date is the date to start with.
So, DateAdd("yyyy",1, Date()) will give you Feb 5, 2008.
Note, if you want to add days, you can also just add a number:
Date()+1 will give you Feb 6, 2007.
Date()-1 will give you Feb 4, 2007.
Chris Nebinger.
On Feb 5, 11:44 am, "IsdWeb" <rhayw...@isdweb.comwrote:
Hello,
I am a newbie to coding and need some help. I am trying to figure out
why the following code is not producing the correct Julian date. Any
suggestions? Also, I am trying to understand the syntax liek what
does DateAdd mean? If anyone can offer some good tutorials it would
be appreciated as well.
Thanks in advance.
Here is the code:
Format((DateAdd("d",-1,DateAdd("yyyy",
5,DateSerial(Year(Now()),Month(Now())+1,1))))-
DateSerial(Year(DateAdd("d",-1,DateAdd("yyyy",
5,DateSerial(Year(Now()),Month(Now())+1,1))))-1,12,31),"000") AS
[Julian Date]