strive4peace
AWF VIP
- Local time
- Today, 02:58
- Joined
- Apr 3, 2020
- Messages
- 1,062
@Valentine
The whole part of the number represents date and the fractional part represents time (noon is halfway through the day so it's 0.5)
by storing dates this way, you can subtract 2 dates to find out how many days (or cells!) are between them
Format is just the way you see the number ~
The whole part of the number represents date and the fractional part represents time (noon is halfway through the day so it's 0.5)
Code:
? CLng(Date)
44690
? Format(1,"mm/dd/yyyy")
12/31/1899
? CDbl(Now)
44690.6097222222
(it's currently 2:38 pm for me -- so 0.6 through the day)
? Date
5/9/2022
? Date- CDate(1)
44689
? Date-CDate(0)
44690
? Date-7
5/2/2022
? Now
5/9/2022 5:10:44 PM
? Now-1.5
5/8/2022 5:10:47 AM
by storing dates this way, you can subtract 2 dates to find out how many days (or cells!) are between them
Format is just the way you see the number ~
Last edited: