Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Date Format change
#3
Solved: 11 Years, 4 Months, 3 Weeks ago
Thx again Inborntester
With:
DateRequested="02/27/2012"

#1, Using:
Code:
DateRequested = month(DateRequested) & "-" & day(DateRequested) & "-" & year(DateRequested)
I get:
"2-28-2012"
#2, Using:
stryear = right(DateRequested, 4)
Code:
strmonth = left(DateRequested, 2)
strday = left(right(DateRequested, 7), 2)
DateRequested = strmonth & "-" & strday & "-" & stryear
I get:
"02-28-2012"

Can #1 also show as "02-28-2012"?
Reply


Messages In This Thread
Date Format change - by mv8167 - 02-28-2012, 03:40 AM
RE: Date Format change - by inborntester - 02-28-2012, 07:38 AM
RE: Date Format change - by mv8167 - 02-28-2012, 10:34 PM
RE: Date Format change - by inborntester - 02-29-2012, 12:01 AM
RE: Date Format change - by sshukla12 - 03-02-2012, 03:10 PM
RE: Date Format change - by mv8167 - 03-02-2012, 07:09 PM
RE: Date Format change - by sshukla12 - 03-05-2012, 10:03 AM
RE: Date Format change - by Saajo87 - 03-05-2012, 11:04 AM
RE: Date Format change - by mv8167 - 03-05-2012, 07:11 PM
RE: Date Format change - by SteveS - 03-05-2012, 08:54 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How do you Change Run mode mid script? Caleytown 6 7,360 03-25-2021, 08:27 AM
Last Post: RB26578
  [UFT] Change property of object (WpfButton) robertosalemi 2 2,642 11-22-2016, 12:43 PM
Last Post: Ankur
  Dynamic change of name for Webtables prakashreddy 1 2,408 10-25-2014, 09:53 PM
Last Post: supputuri
  How can I change my test folders, globally? atester 0 2,064 10-03-2014, 04:37 PM
Last Post: atester
  QTP11.0 - Date format is changed as text while executing the QTP script. Automation Tester 1 4,145 05-30-2014, 01:25 PM
Last Post: Tarik Sheth

Forum Jump:


Users browsing this thread: 1 Guest(s)