
Extracting the date out of a Date/Time field
DatePortion = DateValue(dteDateTime)
TimePortion = TimeValue(dteDateTime)
HTH.
Quote:
> There's got to be a simple function to do this that I just can't find in
> online help!
> I've got a field in a table (dteDateTime) that is filled at various times
> using the Now() function to insert the system date and time. I'm trying to
> build a query that uses the Date or Time portions independently. Are there
> a pair of functions that return only the date or time part of the field as
> in:
> DatePortion = MagicalDateFunction(dteDateTime)
> TimePortion = MagicalTimeFunction(dteDateTime)
> I understand that the date is stored as the integer part of a float
> (variant) and the time is stored as the fractional part. I guess what these
> functions would do is isolate the integer or fractional parts respectively.
> I certainly appreciate the input!
> April
--
Beer, Wine and Database Programming. What could be better?
Visit "Doug Steele's Beer and Programming Emporium"
http://webhome.idirect.com/~djsteele/