Convert date to number (1 Viewer)

JAD001

New member
Local time
Yesterday, 18:16
Joined
Jun 18, 2015
Messages
2
Trying to convert a date in my query to a number. What function will convert 6/17/2015 to 42172? Tried datevalue dateserial
 

pr2-eugin

Super Moderator
Local time
Today, 01:16
Joined
Nov 30, 2011
Messages
8,494
CDbl is the function.
Code:
? CDbl(Date())
 42173 
? CDbl(Now())
 42173.6818402778
 

CJ_London

Super Moderator
Staff member
Local time
Today, 01:16
Joined
Feb 19, 2013
Messages
16,553
try clng

clng(date())
 

JAD001

New member
Local time
Yesterday, 18:16
Joined
Jun 18, 2015
Messages
2
Thanks CDbl and clng both worked. Have to read up on them and why I could not find them.
Thanks again!
 

Users who are viewing this thread

Top Bottom