Question : CONVERT DATE TO JULIAN

Hello,

I found this code and it appears that it should do what I need but I keep getting syntax errors and the VAL & FORMAT seem incorrect in VB Script.  

I need to take this code and make it work in a VB script.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
'JD EDWARDS (AS/400 software) uses dates called JULIAN. 
'A JULIAN Date identifies the year first, then the number of days into the year that
'his date appears. So, Jan 15, 1999 is 99015. March 15 is 99074. March 15, 2001 is
'101074 Dates in Y2K start with 100 (2000), 101(2001) etc.

StartDate = Format("01/15/2000")
TempFromDate = DateValue(StartDate)
TempYr = 100 + Val(Format(TempFromDate, "yyyy")) - Val(Format(DateValue("01/01/2000"), "yyyy"))

TempYr = TempYr * 1000
TempString = "01/01/" + Format(TempFromDate, "yyyy")
fromdate = TempYr + TempFromDate - DateValue(TempString) + 1

Answer : CONVERT DATE TO JULIAN

We did not get to implement any of the Comments, as the client picked the computer up for the diagnostic charge d/t thier time constraints.
Random Solutions  
 
programming4us programming4us