date format in VBS

后端 未结 2 773
感情败类
感情败类 2020-12-06 23:26

I want to get a date in full format in my vbscript. For example, I put
DateParam = FormatDateTime(Date()-1, 2)

But it returns

3/8/201

2条回答
  •  无人及你
    2020-12-07 00:15

    ThisDate = Date()
    
    MyDate = Right("0" & CStr(Month(ThisDate)), 2) & "/" & _
             Right("0" & CStr(Day(ThisDate)), 2) & "/" & CStr(Year(ThisDate))
    

提交回复
热议问题