is it possible to change the date format like MM/DD/YY
into DD/MM?YY through script in QTP

Answers were Sorted based on User's Feedback



is it possible to change the date format like MM/DD/YY into DD/MM?YY through script in QTP..

Answer / m kumar

Date function in qtp displays current system date as
MM/DD/YY,So change this in to DD/MM?YY format below is the
process
Strday = day(date)
Strmonth = month(date)
Stryear = year(date)
Newformat = Strday&"/"&Strmonth&"?"&Stryear

Is This Answer Correct ?    21 Yes 0 No

is it possible to change the date format like MM/DD/YY into DD/MM?YY through script in QTP..

Answer / guru

DD = Day(now)
If Len(DD) = 1 then
DD = "0" & DD
End If

MM = Month(now)
If Len(MM) = 1 then
MM = "0" & MM
End If

YY = Year(now)
YY = right(YY,2)

Date_Format = DD & "/" & MM & "?" & YY

Is This Answer Correct ?    9 Yes 0 No

is it possible to change the date format like MM/DD/YY into DD/MM?YY through script in QTP..

Answer / lak

Strday = day(date)
Strmonth = month(date)
Stryear = right(year(date),2)
Newformat = Strday&"/"&Strmonth&"?"&Stryear
msgbox Newformat

Is This Answer Correct ?    5 Yes 0 No

is it possible to change the date format like MM/DD/YY into DD/MM?YY through script in QTP..

Answer / maya

Dim years
years=inputbox("enter year as MM/DD/YY format")
x=mid(years,4,2)
msgbox x
y=left(years,2)
msgbox y
z=right(years,2)
msgbox x+"/"+y+"/"+z

Is This Answer Correct ?    4 Yes 1 No

is it possible to change the date format like MM/DD/YY into DD/MM?YY through script in QTP..

Answer / snehasis

oldFormate = "MM/DD/YY"
array=split(oldFormate,/)
newFormate = array(1)+array(0)+array(2)

Is This Answer Correct ?    9 Yes 8 No

Post New Answer

More QTP Interview Questions

How to Creating an Output Value using QTP?

1 Answers  


Check point what is how many types of checkpoint and explain

3 Answers   Accenture,


Hi Every body please explain me in steps to use checkpoints and object Repositories in QTP for Flight Reservation application please tell me the steps for this its urgent pls thanx for urs answers

0 Answers  


How to explain a banking project in interview as a test engineer???

0 Answers   Accenture,


hello, i just started searching for a job on QA ,need QTP software full version.plz can any body help me...my email id is padma_ub@yahoo.com.thanks in advance.

0 Answers  


How many tables r created during the recording in QTP?

2 Answers  


If you entered into yahoo mail with your valid user name and password , then you will get " welcome , username " (for example you will see , “welcome, Krishna” ) text on the top of the Inbox page , how can you test the user name is correct or not using QTP?

3 Answers   CTS,


Explain different types of checkpoints?

0 Answers  


HOW AND WHY TO CREATE EMPTY OBJECT IN QTP?

2 Answers   Patni,


Among the 4 capture levels, Complete, Partial, Minimal, None. which one is mostly used?

1 Answers  


In QTP how to interact tool and application build?

2 Answers  


what is keyword driven testing in qtp?n how is it useful?

0 Answers  


Categories