Format date as yyyy-mm-dd using vbscript
Function GetFormattedDate strDate = CDate(Date) strDay = DatePart("d", strDate) strMonth = DatePart("m", strDate) strYear = DatePart("yyyy", strDate) If strDay < 10 Then strDay = "0" & strDay End If If strMonth < 10 Then strMonth = "0" & strMonth End If GetFormattedDate = strYear & "-" & strMonth & "-" & strDay End Function 'For example: the date string will be 2011-03-21 GetFormattedDate()
Thank you for your so cool post,it is useful,i love it very much.please share with us more good articles.
ReplyDeleteQTP Training in Chennai
QTP Course in Chennai
QTP Training in Tambaram
QTP Training in OMR
LoadRunner Training in Chennai
Best Loadrunner training institute in chennai
javascript training in chennai
core java training in chennai
digital marketing at kochi
ReplyDelete