Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error Converting Julian date using DateSerial

Status
Not open for further replies.

trudye10

Programmer
Sep 8, 2006
67
Hi Guys, I found this function to convert julian date online but I'm having trouble getting it to work properly.

S_Date = DateSerial(1900 + (rs1!PDATE \ 1000), 1, rs1!PDATE Mod 1000)

after processing 2007184 S_Date is equal to 7/3/3907. which is bascially correct it s/b 7/3/07? What am I doing wrong?

Thanx,
Trudye
 



T,

What add 1900 when you already have 2007???
Code:
S_Date = DateSerial((rs1!PDATE \ 1000), 1, rs1!PDATE Mod 1000)

Skip,
[sub]
[glasses] When a group touring the Crest Toothpaste factory got caught in a large cooler, headlines read...
Tooth Company Freeze a Crowd! and
Many are Cold, but Few are Frozen![tongue][/sub]
 



WHY, not WHAT. [blush]

Skip,
[sub]
[glasses] When a group touring the Crest Toothpaste factory got caught in a large cooler, headlines read...
Tooth Company Freeze a Crowd! and
Many are Cold, but Few are Frozen![tongue][/sub]
 

Thank you so much for responding Skip but, I'm sorry I didn't get that.

Trudye
 




If rs1!PDATE contains 2007184

then

rs1!PDATE \ 1000 equals 2007

Why would you ADD 1900 to 2007?

Skip,
[sub]
[glasses] When a group touring the Crest Toothpaste factory got caught in a large cooler, headlines read...
Tooth Company Freeze a Crowd! and
Many are Cold, but Few are Frozen![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top