

InterviewSolution
1. |
Solve : VB script help needed? |
Answer» Hi all, sorry if this is something simple, but... What does 09111 mean? In that Jan 11, 2009 ? Quote 09111.txt the last one is YR/Julian day. I'm a bit confused here. The Julian date (JD) is the interval of time in days and fractions of a day, since January 1, 4713 BC. The Julian date for CE 2009 April 4 00:00:00.0 UT is JD 2454925.50000 Julian date is sometimes used as a synonym for day of year, but this is not correct usage. Day of year ranges from 1 to 365 (366 for leap years). Today's day of year (4th April 2009) is 94. So where did the 09111 come from? Here is some date & time stamp vbs code Code: [Select] Dim dd,mm,yy,YYYY,DateStamp,FileName,DayOfYear,DoYstamp dd=Day(Date) mm=Month(Date) yyyy=Year(Date) yy=Mid(yyyy,3,2) DayOfYear=(DatePart("y",Date)) If dd<10 Then dd="0"&dd If mm<10 Then mm="0"&mm If DayOfYear<10 Then DayOfYear="0"&DayOfYear If DayOfYear<100 Then DayOfYear="0"&DayOfYear DateStamp=mm&dd&yyyy wscript.echo "Datestamp "&DateStamp FileName="outputlog."&DateStamp&".txt" wscript.echo "Filename "&FileName DoYstamp=DayOfYear&yy wscript.echo "DoYstamp "&DoYstamp FileName="outputlog."&DoYstamp&".txt" wscript.echo "Filename "&FileName Thanks all. This is what I needed. I do appreciate the help. |
|