[an error occurred while processing this directive]

Mysql Date Expression

                         

The Tutorial illustrate an example from 'Mysql Date Expression'. To understand this example we use current_timestamp query that return you a format  'YYYY-MM-DD' and 'HH.MM.SS'. Timestamp columns are displayed in the same format as Datetime format.

Query:-

 

 

 

 

 

 

mysql> select current_timestamp() as Date;

Output:-

+---------------------+
| Date |
+---------------------+
| 2008-12-19 15:38:44 |
+---------------------+
1 row in set (0.00 sec)

Query:-

The now ( ) Query is used to return the current date and time as Date fieldname.

mysql> select now() as Date;

Output:-

+---------------------+
| Date |
+---------------------+
| 2008-12-19 15:39:37 |
+---------------------+
1 row in set (0.00 sec)

                         

[an error occurred while processing this directive]