This topic is locked

Calculate Days Between two Dates

2/21/2008 8:45:02 AM
ASPRunnerPro General questions
C
ckapote author

Once again I would like to congratulate you for your fantastic software!!!

I have read all posts in your forum but it is not clear how can I take the number of day between two dates and

more specifically .

I have a table with following fields:

Date1 - date

Date2 - date

Date3 - number
I need to find the number of days after adding the Date2 and Date1 .
Please help as I have spent many time looking and testing various with no results.
Thanks

J
Jane 2/21/2008

Hi,
try to use this code in the Before record added/Before record updated events on the Events tab:

dict("Date3") = datediff("d",dict("Date1"),dict("Date2"))

C
ckapote author 2/21/2008

Hi,

try to use this code in the Before record added/Before record updated events on the Events tab:


Great thanks for your very fast response, but I am receiving the following error:

Fatal error: Can't use function return value in write context in C:\xampp\htdocs\include\_test_events.php on line 23

Sergey Kornilov admin 2/21/2008

If you use PHPRunner post this question in PHPRunner forum.