Page 1 of 1

Posted: Wed Mar 19, 2003 1:06 pm
by BackupUser
Restored from previous forum. Originally posted by Julien Morel.

Hi,
How to let to know the number of day which y' has between two date of the type 19-03-2003 ?
I do not see how to make...

Thank for your help




Forum in French
http://www.forumpurebasic.fr.st

Posted: Wed Mar 19, 2003 1:43 pm
by BackupUser
Restored from previous forum. Originally posted by tinman.
Originally posted by Julien Morel

How to let to know the number of day which y' has between two date of the type 19-03-2003 ?
I think you need something like this:

Code: Select all

(Date(year1, month1, day1, 0, 0, 0) - Date(year2, month2, day2, 0, 0, 0)) / (24 * 60 * 60)

--
I used to be a nihilist but I don't believe in that any more.
(Win98first ed. + all updates, PB3.51, Ed3.53)

Posted: Wed Mar 19, 2003 2:45 pm
by BackupUser
Restored from previous forum. Originally posted by Manolo.

Hi,

This is best solution:

Code: Select all

result=DayOfYear(Date(2002, 6, 1, 0, 0, 0))- DayOfYear(Date(2002, 1, 1, 0, 0, 0))+1 
Debug result
Regards,

Manolo

Posted: Wed Mar 19, 2003 3:49 pm
by BackupUser
Restored from previous forum. Originally posted by Manolo.

OOOPPPPSSS,
Sorry,
Is best the example of tinman, because DayOfYear only work in the same year.

:)

Manolo