Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to get custom formatted date from qtp
#2
Not Solved
If your date format is an string (from an inputfield or sth like that), you can dismember the string in different parts:

Code:
year = left(YYYY-MM-DD, 4)
month = left(right(YYYY-MM-DD, 5), 2)
day = right(YYYY-MM-DD, 2)

newdateformat = month & "/" & day  & "/" & year

You have to adapt the code if you have no leading "0", 23.5.2008 instead of 23.05.2008.

Hope this helps.
Reply


Messages In This Thread
RE: How to get custom formatted date from qtp - by QADBA - 08-25-2008, 06:11 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to append date to xls file using qtp datatable methods? yona34 1 1,656 05-04-2018, 08:56 PM
Last Post: Ankur
  QTP not recognizing date calendar kQTPs 1 3,613 12-20-2017, 11:21 PM
Last Post: harikrishna
  QTP11.0 - Date format is changed as text while executing the QTP script. Automation Tester 1 4,122 05-30-2014, 01:25 PM
Last Post: Tarik Sheth
  How to set value to custom property ? Ranu 0 2,043 11-14-2013, 02:58 AM
Last Post: Ranu
  Custom CheckPoint rajrkodeep 0 3,958 09-06-2012, 11:19 PM
Last Post: rajrkodeep

Forum Jump:


Users browsing this thread: 1 Guest(s)