I'm trying to find how many days are between two dates (the first one is now, and the second one is in a table).
I've build this :
Int((Now - DateParse (Tftabledonnees.Cell("Date",3)))/10000000/60/60/24)
It seems to work when the two dates are in the same month, but it doesn't work othewise.
It would be fine if someone could help me... and if everybody in this forum could excuse me for my poor english.
Thank you.
Hi, your code will get (-)negative value for future date, (+)positive value for past date. it works ok.
Just make sure of a given date, which is in a correct 'dateFormat' in using 'dateParse' statement.
Hello,
With your answers, I've found the solution.
Some dates that I used had not the right format (01/01/2007 instead of 01/01/07)
It works well now.
I also use now the constant "cTicksPerDay"