Home Sql Sqldate Mysql Date Expression



Mysql Date Expression
Posted on: December 31, 2008 at 12:00 AM
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'.

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)

Related Tags for Mysql Date Expression:
sqlmysqlcqueryormdateformtimeioformattimestampexpressiontutorialreturnriathisforexampletoexpressexamssieiluseimfromcurrentrmstamnttrddesmeratetorxaxampsurnessatmyishaimellmplpresspreandstampstrxptutorssrirentamthsthatpleplprndonomo


More Tutorials from this section

Ask Questions?    Discuss: Mysql Date Expression  

Post your Comment


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

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.