In MySQL, I format my timestamps as a 14-digit number. So, this:
2019-02-14 22:05:14
becomes:
20190214220514
I have a query that looks like this:
SET @var_old_date = 20190214134909;
SET @var_new_date = 20190214161409;
INSERT INTO table_1
SELECT @var_new_date, colB, colC FROM table_2
WHERE postdate=@var_old_date;
Is there a way that I can set @var_new_date automatically, though, without plugging in my own number?
I've tried using both of these:
NOW() + 0
SELECT CONCAT(CURDATE() + 0, CURTIME() + 0)
but both add ".000000" microseconds to the end.