Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question


Avatar of SnowLapa
SnowLapa asked on
ProgrammingMicrosoft DevelopmentVB Script
10 Comments1 Solution800 ViewsLast Modified:

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.
'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
Avatar of rdivilbiss
This problem has been solved!
Unlock 1 Answer and 10 Comments.
See Answers