example-date format is 01-jan-09 in QTP.How to convert this
format to 01-01-09?
Answers were Sorted based on User's Feedback
Answer / saravanaraja
Balaji First you understand the question.
Ex: 01-jan-09 in QTP. How to convert this
format to 01-01-09?
MsgBox date. This is simple to view the Current date.
They asked How to convert 01-jan-09 TO 01-01-09.
| Is This Answer Correct ? | 14 Yes | 3 No |
Answer / brahma naidu kapa
It's very simple question;
no need to write all the excessive code.
Please convert the given value into date format by using
the CDATE Function
val = "01-jan-09"
Conv_Val = cdate(val)
msgbox Conv_Val
Result : "01-01-2009"
| Is This Answer Correct ? | 13 Yes | 5 No |
Answer / kiran kallepu
please find below code
givenDate = "01-jan-09"
DD = Day(givenDate)
msgbox DD
MM= month(givenDate)
msgbox MM
YY=year(givenDate)
msgbox YY
sysdate=DD&"-"&MM&"-"&YY
msgbox sysdate
| Is This Answer Correct ? | 8 Yes | 4 No |
Answer / swati
I could not find any straight way to do this, however it
had to be done in a customized manner:
newDate = day(date) & "-" & month(date) & "-" & year(date)
| Is This Answer Correct ? | 6 Yes | 5 No |
Answer / pratatp
i also not find the straight way.
dat=datevalue("01-jan-09")
d=day(dat)
m=mon(dat)
y=year(dat)
con_dat=d&"-"&m&"-"&right(y,2)
msgbox con_dat
| Is This Answer Correct ? | 2 Yes | 2 No |
Answer / harish
val = "01-jan-09"
Conv_Val = cdate(val)
msgbox Conv_Val
newvalue = replace(Conv_Val,"/","-")
values = split(replace(newvalue,right(newvalue,4),right(newvalue,2)),"-")
for i = 0 to ubound (values)
if Len(values(i)) <2 then
temp = temp & "0" & values(i) & "-"
Else
temp = temp & values(i)
End If
Next
msgbox temp
'Result : "01-01-09"
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / rajendra
Please find code below:
'get date
StrDay=Day(now)
'get Month
StrMon=Month(now)
'get Year
'Stryear=year(now)
' Assemble the Date according to the ur requirement ( ex:01-
01-2010)
ExpDate=StrDay&"-"&StrMon&"-"&'Stryear
msgbox ExpDate
| Is This Answer Correct ? | 1 Yes | 4 No |
Answer / vishakha b
If you are talking about some date value in global sheet,
here is the procedure:
Select the entire column where the Date is put in the
format: 01-jan-09
Right click, go to Format => Custom Number. Select 'Date'
under 'Category' and type the format you want into 'Type'
text box. Click 'OK'
| Is This Answer Correct ? | 0 Yes | 7 No |
how quick test record on dynamically generated urls and web pages.
how to retreive the xml file data through qtp.can anybody send script for this..
QTP in mumbai
How can you Open a Notepad and How can you write the test Resuts in Notepad by Using QTP?
one ok button and one text box is there.when i click on ok button in that text box one no. will display from 1 to 100 randomley.if that is not 100 when we click on ok button again ,again another text box ll created with another no. we will continue this till the text box created and displays 100.and when its 100 ok button should disabled. remember thet no will display not seriely ,it displays randomley,and each time new text box will created.
write vb script code to delete the duplicate values in an array.
what is synchronization point, synchronization method, wait property method? with examples.. plz explain this in brief
what is input pramater out output pramater ?i want the decrepation..?how to use in QTP?
3 Answers Infinite Computer Solutions,
How to capture text from image to word
What is repository parameters in QTP?how will we define that????what is unmapped & mapped repository parameters????????
How can you quit from Action.
What is the framework your company is following. What is the reason. Explain why key word driven frame work is chosen.