Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

mysql select or insert current datetime

SELECT now();
2021-07-26 22:08:15
the now() function returns the date and time when the query starts
the sysdate() function returns the exact date and time the query completes

select sysdate();
+---------------------+
| sysdate()           |
+---------------------+
| 2021-07-26 22:12:19 |
+---------------------+
Source by linuxhint.com #
 
PREVIOUS NEXT
Tagged: #mysql #select #insert #current #datetime
ADD COMMENT
Topic
Name
1+2 =