date format function to display date as “Jan 13 2014”

前端 未结 3 1048
渐次进展
渐次进展 2020-12-07 05:33

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

3条回答
  •  长情又很酷
    2020-12-07 06:28

    FormatDate formats a date according to the format configured in the system's regional settings. If you want a custom date format using VBScript builtins, you'd do it like this:

    WScript.Echo MonthName(Month(Now), True) & " " & Day(Now) & " " & Year(Now)
    

提交回复
热议问题