| || |
Date and Timezone format in QTP
When I record my java app in QTP, it gives me this for the date:
.Set "Wed Oct 31 00:00:00 CDT 2007"
.Set "Sun Dec 30 00:00:00 CST 2007"
I tried the FormatDateTime function within QTP but couldn't make it to display similar to what seen above. I think the format above is java based format for date and timezone. Is there a way in QTP or VBS that perform similar thing to archive the format above? I search for Timezone in QTP help but no luck.
Re: Date and Timezone format in QTP
Try this :
Public Function FormatDate (Mydate,myformat)
Set OExcel = CreateObject("excel.application")
FormatDate = OExcel.Text(Mydate, MyFormat)& " CDT " & Year(Now)
Set OExcel = Nothing
print FormatDate (now(),"ddd mmm dd hh:mm:ss")