help with dates

adbftrainer

Member
Licensed User
I have two input vars. from user using the calendar control, i want to know how many days are between the two dates, and (assign the value to another var. this part i know). Thank you for any help. I love this program, i have been using it for about a week.

Again Thank you
sue
 

Cableguy

Expert
Licensed User
You wil need to do 2 operations, first get the date equivalent in ticks...(for both dates), then subtract the dates...this gets you the icks bettwen the dates...
Overall,something likethis...

B4X:
daydif=(DateParse(date2)-DateParse(date1))/(86400*10000000)
Date2: the newst date
date1: the oldestdate
daydif=(DateParse(date2)-DateParse(date1)) gets the tick value diference bettween dates
86400*10000000) is the number of tick in 1 day...
 

adbftrainer

Member
Licensed User
Like Magic

Thank you again, you answered more than i asked, it was EXTREMELY HELPFUL.
The code worked like a charm. NEVER have i seen a program that was tailored for the component of my business. I am writing my own. This is very important to me. sue
 
Top