Insert the date and time separately into an SQL query

geronimo-78
Fri, 13 Jun 2025 20:50:05 +0000
General

Hello,
Excuse me for this naive question, but I'm a beginner.
Here's my problem: I have a sensor that sends me speed information when an object passes in front of it. I want to record the date, time (in different columns), and speed in a MySQL database. Currently, I record the speed and the date and time with curtime (but in the same column).
My question: how can I have two variables with the date and time to insert them into my SQL query?
Thanks for your help.
Jean

7 posts - 5 participants