add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
-- Insert '2021-04-30 08:51:30' using different input formats
CREATE TABLE test ( id INT AUTO_INCREMENT PRIMARY KEY, dt DATETIME);
-- classic string representation
INSERT INTO test (dt) VALUES ('2021-04-30 08:51:30');
-- classic string representation, no leading zeros
INSERT INTO test (dt) VALUES ('2021-4-30 8:51:30');
-- solid string representation
INSERT INTO test (dt) VALUES ('20210430085130');
-- numeric representation
INSERT INTO test (dt) VALUES (20210430085130);
-- custom string representation,
-- according function and specific pattern applied
INSERT INTO test (dt) VALUES (STR_TO_DATE('30.4.2021,8-51-30', '%e\.%c\.%Y,%k-%i-%s'));
SELECT * FROM test;
id dt
1 2021-04-30 08:51:30
2 2021-04-30 08:51:30
3 2021-04-30 08:51:30
4 2021-04-30 08:51:30
5 2021-04-30 08:51:30