ciginfo Well-Known Member Licensed User Longtime User Jul 9, 2011 #1 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
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
klaus Expert Licensed User Longtime User Jul 9, 2011 #2 Le code est le suivant: B4X: dateDG = Dd.DateTicks nbrJours = (now-dateDG)/DateTime.TicksPerDay LblnbrJours.Text = nbrJours Meilleures salutations. Upvote 0
Le code est le suivant: B4X: dateDG = Dd.DateTicks nbrJours = (now-dateDG)/DateTime.TicksPerDay LblnbrJours.Text = nbrJours Meilleures salutations.
ciginfo Well-Known Member Licensed User Longtime User Jul 10, 2011 #3 OK, merci beaucoup François Upvote 0