Changing the date format in QTP9.0

791 views
Skip to first unread message

Arun

unread,
Feb 3, 2009, 1:45:41 AM2/3/09
to Mercu...@googlegroups.com
Hi,
 
I have to change the system date to the format DD-MMM-YYYY i.e. 03-FEB-2009... Can anyone help me??
 
Your help is much appreciated.
 
Thanx,
Arun.

kapil sachdeva

unread,
Feb 3, 2009, 2:49:26 AM2/3/09
to Mercu...@googlegroups.com
Hi
 
 
i think u can use the FormatDateTime date function in vbscript , that should work..
try it.

Roman Zilber

unread,
Feb 3, 2009, 10:22:49 AM2/3/09
to Mercu...@googlegroups.com
Why do you need it?

Control Panel==>Regional and Language Options==>Format

Sreedhar Mallipeddi

unread,
Feb 4, 2009, 9:04:31 AM2/4/09
to Mercu...@googlegroups.com
hi

Use the below code

        StrDateFormat  = FormatDateTime(StrDate, 1)
        StrDateFormat1  = Split (Trim(StrDateFormat),",",-1,1)
        StrDt  = Right(Trim(StrDateFormat1(1)),2)
        StrMonth  = Ucase (Left(Trim(StrDateFormat1(1)),3))
        fDateformat  = StrDt&"-"&StrMonth&"-"&Trim(StrDateFormat1(2))

On Tue, Feb 3, 2009 at 12:15 PM, Arun <aruu...@gmail.com> wrote:



--
Mallipeddi Sreedhar
91-9848871279

Arun

unread,
Feb 6, 2009, 12:32:06 AM2/6/09
to Mercu...@googlegroups.com
Hi,
 
This worked fine.. Thanx for ur assistance.
 
Thanx,
Arun.

Tarun Lalwani

unread,
Feb 28, 2009, 11:39:34 PM2/28/09
to QTP - HP Quick Test Professional - Automated Software Testing
You can also use a VBScript function that has lot more formatting
options for dates

http://knowledgeinbox.com/articles/vbscript/formatting-date-and-time/
Reply all
Reply to author
Forward
0 new messages