Is there any function to display date in the format mmm-dd-yyyy in VBScript?
eg. today\'s date as Jan 22 2014?
I tried using function
Below function will help which is returning in "dd-mmm-yyyy hh:mm:ss" format. You can customize the format according to your need.
Function timeStampForLogging(t)
Dim Months
Months = Array("Jan", "Feb", "Mar", "Apr", "May", "Jun", _
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec")
timeStampForLogging = Right("0" & Day(t),2)& "-" & _
Months(Month(t)-1) & "-" & _
Year(t) & " " & _
Right("0" & Hour(t),2) & ":" & _
Right("0" & Minute(t),2) & ":" & _
Right("0" & Second(t),2)
End Function