H hunterboy New member Local time Today, 20:14 Joined Jul 26, 2004 Messages 8 Jul 26, 2004 #1 how do i convert my time field 3:11:07 PM to seconds using microsoft access query sql?
W WayneRyan AWF VIP Local time Today, 12:14 Joined Nov 19, 2002 Messages 7,120 Jul 26, 2004 #2 Hunter, I think this should do it: DateDiff("s", Date() & " 00:00:00 AM", Date() & [YourTimeField]) Wayne
Hunter, I think this should do it: DateDiff("s", Date() & " 00:00:00 AM", Date() & [YourTimeField]) Wayne
H hunterboy New member Local time Today, 20:14 Joined Jul 26, 2004 Messages 8 Jul 26, 2004 #3 SELECT Newlog.Time DateDiff("s",Date() & " 00:00:00 AM",Date() & [Newlog.Time]) FROM Newlog; my sql statement is this but i get a syntax error (missing operator) in query expression 'Newlog.Time DateDiff("s",Date() & " 00:00:00 AM",Date() & [Newlog.Time])' how do i modify it?
SELECT Newlog.Time DateDiff("s",Date() & " 00:00:00 AM",Date() & [Newlog.Time]) FROM Newlog; my sql statement is this but i get a syntax error (missing operator) in query expression 'Newlog.Time DateDiff("s",Date() & " 00:00:00 AM",Date() & [Newlog.Time])' how do i modify it?
W WayneRyan AWF VIP Local time Today, 12:14 Joined Nov 19, 2002 Messages 7,120 Jul 26, 2004 #4 Hunter, Your query is returning two fields. Need a comma between them. Code: SELECT Newlog.Time, <-- Add this comma DateDiff("s",Date() & " 00:00:00 AM",Date() & [Newlog.Time]) FROM Newlog; Wayne
Hunter, Your query is returning two fields. Need a comma between them. Code: SELECT Newlog.Time, <-- Add this comma DateDiff("s",Date() & " 00:00:00 AM",Date() & [Newlog.Time]) FROM Newlog; Wayne
H hunterboy New member Local time Today, 20:14 Joined Jul 26, 2004 Messages 8 Jul 26, 2004 #5 the results display beside the time field shows #Error...
W WayneRyan AWF VIP Local time Today, 12:14 Joined Nov 19, 2002 Messages 7,120 Jul 26, 2004 #6 Hunter, You can't have a field named "Time". Access has that reserved for its own use. Wayne
H hunterboy New member Local time Today, 20:14 Joined Jul 26, 2004 Messages 8 Jul 26, 2004 #7 hi Wayne, i tried renaming the field.. here's my SQL SELECT Newlog.Timer, DateDiff("s",Date() & " 00:00:00 AM",Date() & [Newlog.Timer]) FROM Newlog; but it still returns an error....
hi Wayne, i tried renaming the field.. here's my SQL SELECT Newlog.Timer, DateDiff("s",Date() & " 00:00:00 AM",Date() & [Newlog.Timer]) FROM Newlog; but it still returns an error....
W WayneRyan AWF VIP Local time Today, 12:14 Joined Nov 19, 2002 Messages 7,120 Jul 26, 2004 #8 Hunter, Had to do some research, I don't use times that often. Code: SELECT DatePart("h", [Timer]) * 3600 + DatePart("n", [Timer]) * 60 + DatePart("s", [Timer]) FROM Newlog; Wayne
Hunter, Had to do some research, I don't use times that often. Code: SELECT DatePart("h", [Timer]) * 3600 + DatePart("n", [Timer]) * 60 + DatePart("s", [Timer]) FROM Newlog; Wayne
H hunterboy New member Local time Today, 20:14 Joined Jul 26, 2004 Messages 8 Jul 26, 2004 #9 thanz alot