Link to home
Start Free TrialLog in
Avatar of Aiysha
AiyshaFlag for United States of America

asked on

Query to extract time and date from datetime column in Access

Query to extract time and date from datetime column in Access

Time & Date(SEC)  column is      12/1/2018 12:01:20 AM

SELECT [Time Date TABLE].[Time & Date(SEC)], int( [Time & Date(SEC)]) as JustDate, [Time & Date(SEC)]-int([Time & Date(SEC)]) as justTime FROM [Time Date TABLE];

Query result is as follows:

Time & Date(SEC)                     JustDate               justTime
12/1/2018 12:01:10 AM           12/1/2018            8.10185185400769E-04

Date is getting converted correctly however time column gives some strange number.

Any help will be highly appreciated.

Thank you,
ASKER CERTIFIED SOLUTION
Avatar of Dale Fye
Dale Fye
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
glad I could help.