QTP Script to display date in different formats-VB Script to display date in different formats

QTP Script to display date in different formats


Dim a
a=FormatDateTime(Date(),vbGeneralDate)
MsgBox(a)

Output-8/8/2012



Dim a
a=FormatDateTime(Date(),vbLongDate)
MsgBox(a)

Output-Wednesday, August 08, 2012



Dim a
a=FormatDateTime(Date(),vbShortDate)
MsgBox(a)

Output-8/8/2012

No comments:

Related Posts Plugin for WordPress, Blogger...