Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Date Function
#1
Solved: 10 Years, 9 Months ago Question 
Hi,
I want to get System Date Minus time in my checkpoint. My checkpoint fails because my Expected Value is the System Date & my Actual Value is the System Date + Time . I need to retreive only Date & not time from my Datatable . Is there any way we can do that & how it needs to be done.

Thanks in Advance,
Nilu Verma
Reply
#2
Solved: 10 Years, 9 Months ago
The TODAY() Function and the NOW() Function
The TODAY function returns the serial number of today's date based on your system clock and does not include the time. The NOW function returns the serial number of today's date and includes the time.

So, make an entry in your datatable without the quotes "=TODAY()"
Reply
#3
Solved: 10 Years, 9 Months ago
Get the Date only using the Date (Build in constant)
Reply
#4
Solved: 10 Years, 9 Months ago
Depending on which format you need, you can get the data also separately:

Day(now)
Month(now)
Year(now)
Reply
#5
Solved: 10 Years, 9 Months ago
You can use date() function. This will display the system date(usually in mm/dd/yyyy formate)

example:
Code:
Dim tdate
tdate=date()
msgbox tdate

Regards
Raj
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Calling a function in a Test Script from a function library anupam4j 3 5,905 06-26-2015, 12:31 AM
Last Post: babu123
  Need Help Datatable Parameterzing Date debindas 1 3,419 08-30-2012, 11:43 PM
Last Post: QTPScript
  How To Select Date From a Calender Image Where Date field is non editable? RameshKrishnan 1 3,840 05-28-2012, 09:29 PM
Last Post: defcon3
  Date Format change mv8167 9 49,200 03-05-2012, 08:54 PM
Last Post: SteveS
  Returned Date Format mv8167 3 5,737 07-06-2011, 09:25 AM
Last Post: rajpes

Forum Jump:


Users browsing this thread: 1 Guest(s)