Interview Questions   Tutorials   Discussions   Programs   Videos   

QTP - How can we add regular expression for date field (dd/mon/yyyy)?




262
views
asked marvit August 21, 2014 05:32 AM  

How can we add regular expression for date field (dd/mon/yyyy)?


           

1 Answers



 
answered By Dharma   0  

"sDate" is the normal date-

sDay=Datepart("d",sDate)
sMonth = Datepart("m",sDate)
sYear = Datepart("yyyy",sDate)
If Len(sDay) = 1 Then
sDay = "0" & sDay
End If
If Len(sMonth) = 1 Then
sMonth = "0" & sMonth
End If
sDate = sMonth & "/" & sDay & "/" & sYear 
flag   
   add comment

Your answer

Join with account you already have

FF

Preview


Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert