how to write regular expression for Date field?
Answers were Sorted based on User's Feedback
Answer / raghu
To apply Regular expression for Date we have to split months
1) [0][1-9] because it accepts 01,02,...09 as months
2) [1][1-2] and this is for 10th,11th, 12th months
Now The Regular expression for whole date format is as follows
Example MM/DD/YY
[0][1-9][/][0-9][0-9][/][0-9][0-9] for 1 to 9 months
[1][1-2][/][0-9][0-9][/][0-9][0-9] for 10 to 12 months
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / ratikanta
[0][1-9]|[1-2][0-9]|[3][0-1]-[0][1-9]|[1][0-2]-[1-9][0-9][0-9][0-9]
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / naresh
30/12/12 format
(0-3)(0-3)/(0-1)(0-9)/(0-9)(0-9)
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / biswarup
dd-mm-yy format then it will be
[[0-3][0-9]]&&[^3[2-9]^00]-[[01][0-9]]&&[^1[3-9]^00]-\d{2}
please rectify me if you find it to be incorrect or with
some minor error, as i'm not completely sure about the part
after '&&', i mean, the error is not in the logic but in the
syntax of using the AND and OR operators.
| Is This Answer Correct ? | 7 Yes | 8 No |
Answer / rajesh
[1-9]|1[0-2]/[1-9]|[1-2][0-9]|3[0-1]/19[0-9][0-9]|2[0-9][0-9][0-9]
This works for 1900 to 2999
| Is This Answer Correct ? | 0 Yes | 1 No |
Answer / rajesh vanamala
MM/DD/YYYY
[0][1-9]|[1][0-2]/[0][1-9]|[1][0-9]|[2][0-9]|[3][0-1]/[1-9][0-9][0-9][0-9]
| Is This Answer Correct ? | 1 Yes | 2 No |
for example date formate is dd/mm/yy
than [0-3][0-9]/[0-1][0-2]/[0-9][0-9]
| Is This Answer Correct ? | 14 Yes | 18 No |
Answer / sow
[0-3][0-1]/[0-1][0-2]/200[0-9]
This would take only 2001 to 2009. It will not accept 1999.
| Is This Answer Correct ? | 2 Yes | 7 No |
Answer / ashok
For example date format is dd/mm/yy
than [0-3][0-9]/[0-1][0-9]/[0-9][0-9]
| Is This Answer Correct ? | 4 Yes | 15 No |
Answer / satyanarayana
If the date field is in the following format
'mm/dd/yy'
[0-1][0-9]/[0-3][0-9]/200[0-9]
| Is This Answer Correct ? | 4 Yes | 17 No |
Explain the concept of object repository and how quicktest professional (qtp) recognises objects?
how do you invoke the application through QTP?
i need to learn the descriptive programming very well so for that what to do am reading the qtp user mannual but it is not so any materials or links with examples i want please help me
how will u do database testing in qtp? how will u do the same with descriptive programming?
ACTUALLY I AM WORKING IN THE DISTRIBUTION DOMAIN.MY COMPANY IS PROVIDING DISTRIBUTION SOFTWARE FOR PHARMA AND FMCG DISTRIBUTORS.HERE I AM USING QTP 9.2.HERE IN MY APPLICATION WHILE RECORDING ONE WINDOW APPEARS.IN THAT I CAN SELECT THE ITEM OR NO NEED TO SELECT.BUT WHILE RUNNING THE SAME SCRIPT THE WINDOW MAY NOT APPEAR OR APPEAR.HOW TO WRITE SCRIPT FOR THIS
Write a code check the checkbox in the web table which is in the 4th row and fifth column (Use child item concept)
Where you can store check point results?
hw to create a frame work in qtp..what are the basic steps
how can i do QTP Certification can any 1 tell me . How 1 approch and who to approch
What is operator in VB Script?
HOW CAN WE GET THE VALUE OF TEXT BOX IN QTP? can you give me sample script for this where there is some condition. like if "text" THEN msgbox() else endif
i have to prepare qtp certification course. so, please send me qtp tutorial notes.