Comments on: QTP DateSerial and Now Function (A Guide to Time Travel) https://testguild.com/qtp-dateserial-functions/ Wed, 16 Nov 2022 02:21:45 +0000 hourly 1 By: Amar https://testguild.com/qtp-dateserial-functions/#comment-127951 Tue, 16 Sep 2014 03:20:53 +0000 https://testguild.com/?p=199#comment-127951 Hi Joe,

I have an issue when calculating the duration. For instance i have added a code like this

starttime = Time()

perform some actions

endtime = Time()

difference = endtime – starttime

Desired Output must be – hh :mm:ss

Coluld you please provide a solution.

]]>
By: paul https://testguild.com/qtp-dateserial-functions/#comment-108821 Mon, 12 May 2014 13:16:12 +0000 https://testguild.com/?p=199#comment-108821 Help my to write my date and the real time like this format :
Browser(“Browser”).Page(“Page”).WebEdit(“agenda”).Set “12/05/04 16:40”

What the script to write “12/05/04 16:40”? Please;
Thanks.

Paul

]]>
By: Jagadeesh https://testguild.com/qtp-dateserial-functions/#comment-72407 Thu, 02 Jan 2014 08:09:54 +0000 https://testguild.com/?p=199#comment-72407 Hi
I’ve issue in comparing date with current date and displayed date in my application.
In my application date is displayed as 01/02/2014
And date retrieved through QTP (date function) is displayed as 1/2/2014. When I compared it, my result fails. Please suggest me, how to overcome this issue?
Example:
Applicationdate=”01/02/2014”
Currentdate= Date
If Applicationdate= Currentdate Then
Msgbox “Date Passed”
Else
Msgbox “Date Failed”
End If

Month displayed in application is 02 while month displayed by qtp date function is 2.
Thank’s
Jagadeesh Mani
visitjaga@gmail.com

]]>
By: Jagadeesh https://testguild.com/qtp-dateserial-functions/#comment-72406 Thu, 02 Jan 2014 08:08:20 +0000 https://testguild.com/?p=199#comment-72406 Hi
I’ve issue in comparing date with current date and displayed date in my application.
In my application date is displayed as 01/02/2014
And date retrieved through QTP (date function) is displayed as 1/2/2014.
When I compared it, my result fails. Please suggest me, how to overcome this issue?

Example:
Applicationdate=”01/02/2014”
Currentdate= Date
If Applicationdate= Currentdate Then
Msgbox “Date Passed”
Else
Msgbox “Date Failed”
End If

Month displayed in application is 02 while month displayed by qtp date function is 2.

Thank’s
Jagadeesh Mani
visitjaga@gmail.com

]]>
By: Vera Z https://testguild.com/qtp-dateserial-functions/#comment-20875 Sun, 17 Jun 2012 19:47:41 +0000 https://testguild.com/?p=199#comment-20875 In reply to Joe Colantonio.

Hi Joe. Thanks for the advice. I got the code to work. It appears at the end of this message. [I did not have the correct format in the replace statement]
DateTimeStamp = Now
DateTimeStamp = replace(DateTimeStamp,”/”,”-“)
DateTimeStamp = replace(DateTimeStamp,”:”,”-“)
DataTable.ExportSheet “c:\QTP Tests\Admin_Companies_” & DataTable.Value(“Agency”, dtGlobalSheet) & DateTimeStamp & “.xls”, 1

]]>
By: Joe Colantonio https://testguild.com/qtp-dateserial-functions/#comment-19817 Sat, 09 Jun 2012 20:04:39 +0000 https://testguild.com/?p=199#comment-19817 In reply to Vera Z.

Vera Z » Hi Vera can you send me the code that you are using? Also what values are you trying to use to replace the / and : with> I dbl checked and I was able to do the following without issue:
mydate = Now
msgbox mydate
mydate = replace(mydate,”/”,”^”)
mydate = replace(mydate,”:”,”{“)
msgbox mydate

]]>
By: Vera Z https://testguild.com/qtp-dateserial-functions/#comment-19167 Sat, 02 Jun 2012 23:50:37 +0000 https://testguild.com/?p=199#comment-19167 I need to replace the “/” and “:” from the NOW function. Am using NOW to append date and time to an output file in a script. Cannot save fle with the normal output format from NOW function. Am new to QTP and have not had success with the replace function.

]]>
By: Joe Colantonio https://testguild.com/qtp-dateserial-functions/#comment-10325 Thu, 05 Apr 2012 13:06:11 +0000 https://testguild.com/?p=199#comment-10325 In reply to Pooja.

Pooja » Cool! Thanks Pooja!

]]>
By: Pooja https://testguild.com/qtp-dateserial-functions/#comment-10299 Thu, 05 Apr 2012 08:49:41 +0000 https://testguild.com/?p=199#comment-10299 Thanks sooooo much… Above content is really useful!! :)

]]>
By: Tweets that mention QTP DateSerial Functions — A QTP Guide to Time Travel — Joe Colantonio -- QuickTest Pro, Tech Geek, Bibliomanic, The Software Test Automation Imagineer -- Topsy.com https://testguild.com/qtp-dateserial-functions/#comment-277 Tue, 01 Feb 2011 18:59:08 +0000 https://testguild.com/?p=199#comment-277 […] This post was mentioned on Twitter by testingfeeds and Joe Colantonio, Joe Colantonio. Joe Colantonio said: QTP DateSerial Functions — A QTP Guide to Time Travel http://goo.gl/fb/L0vT6 […]

]]>