Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


how to write regular expression for Date field?

Answers were Sorted based on User's Feedback



how to write regular expression for Date field?..

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

how to write regular expression for Date field?..

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

how to write regular expression for Date field?..

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

how to write regular expression for Date field?..

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

how to write regular expression for Date field?..

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

how to write regular expression for Date field?..

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

how to write regular expression for Date field?..

Answer / a kiran kumar

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

how to write regular expression for Date field?..

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

how to write regular expression for Date field?..

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

how to write regular expression for Date field?..

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

Post New Answer

More QTP Interview Questions

What is method name to compare two XML files.

0 Answers  


I am using "QTP 9.0" in my system, need to install java add-ins to test the java based applications, please prvide information from where i can get those java add-ins for QTP 9.0

0 Answers   Infosys,


how we implement share object repository in QTP 9.0 without using quality Centre , Explaine in brief

0 Answers   HCL,


For what purpose to we use object repository in a application?also explain usage of obj.repository?

3 Answers  


How to find the OS name by using QTP script?

2 Answers   IBM, Tech Mahindra,


Call to copy of an action and call to existing action… i know the diff but in real project how to use..? i want live scenario.pls help me..

0 Answers  


can we call a test in another test?

3 Answers   iFocus,


when qtp recognizes a web link like (hyper link)wich properties it is going to take to identify the objects unquely? what is Ini file in QTP?

1 Answers   Symantic Space,


How many ways we can parameterize data in quicktest professional (qtp)?

0 Answers  


How will you test a keyboard?

0 Answers  


1. What is the difference between Keyword and function in the keyword driven framework? 2. How do you associate Keywords to the script ?

0 Answers  


In a Web appl, on a page, there are student names & details listed.On clicking sort button,details are sorted on Names.How do u verify htat sorting is done by using QTP?

1 Answers   IBM,


Categories