Re: date/time -vbscript

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi,



A solution:



dt = Date
tm= Time
strFilePrefix= year(dt) & "_" & Month(dt) & "_" & Day(dt) & "-" &
Hour(tm) & "_" & Minute(tm) & "_" & Second(tm)



You can also generate unique identifier using VbScript using
Scriptlet.TypeLib.



Set T = CreateObject("Scriptlet.TypeLib")
Wscript.echo "Here it is: " & T.Guid
Set T = Nothing



Thanks,
Fabrice Canel


"Big D" <BigDaddy@xxxxxxxxxxxxxxxx> wrote in message
news:%23iCHMaLYFHA.2740@xxxxxxxxxxxxxxxxxxxxxxx
>I am creating a log file and need to make sure the log files created is
>unique. How can I get the following:
>
> strFilePrefix= strYear & strMonth & strDay & "-" &strHour & strMinute
> & strSecond
>


.