| || |
QTP11.0 - Date format is changed as text while executing the QTP script.
I am using QTP11.0.
I am using extenal file[excel] for testdata.
In one of my scripts, in excel, for one cell i used the formula for date.
the date format is "=Now()+"2:30"
This formula first i tried in testdata file. few days it works fine.after that i did not work well. then I gave the same date fromula in test script file[excel] it self.
when we open the file and see it shows as date .But In both cases it is changed as text while executing the QTP scripts. the cell data shows as "Hide 158".
I tried in different ways. but no luck.
If any body knows the solution please post the answer.
Thanks in Advance...
One possible way would be to have the date time string created as per the format your are looking for in your script or function library.
If you have a function then call that function wherever necessary and update\enter into the field and verify.
Or try updating the excel file[data sheet] at the beginning of the script execution and give it a try.
But wondering why you are getting the cell data as you mentioned above, anyway let know if any of the above solution could solve your problem.
Did you checked is there a change in machine date format? other option is to use SetLocale() function.