How many days between two dates (bis)

ciginfo

Well-Known Member
Licensed User
Longtime User
Bonjour,
How to calculate number of days between a date given by Date Dialog and now.


Dim Dd as DateDialog
Dim now, dateDG, nbrJours as long
Dim LblnbrJours as Label

dateDG = Dd.DateTicks
nbrJours = (now-dateDG)/10000000/60/60/24
LblnbrJours.Text = nbrJours
'-> it returns 0, it is wrong

If i replace 10000000/60/60/24 by cTicksPerDay
'-> Error description: Undeclared variable 'cticksperday' is used before it was assigned any value.

Thank you very much
 
Top