Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training

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'.

Ads

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)

Advertisements

Share on Google+Share on Google+

Mysql Date Expression

Posted on: December 31, 2008 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Advertisements

 

Discuss: Mysql Date Expression  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0

Ads

 

Ads