Mysql Time Only

Mysql Time Only is used to return the current time on your current local system.

Ads

Mysql Time Only

     

Mysql Time Only is used to return the current time on your current local system.

Understand with Example

We already make you understand on current date and time. The below Query now( ) return you the current date and time  as field name Dateandtime.

Query to find Current time and date:-

 

 

 

 

mysql> select now()as Dateandtime;

Output:-

+---------------------+
| Dateandtime         |
+---------------------+
| 2008-12-23 11:32:39 |
+---------------------+
1 row in set (0.00 sec)

Query to find time only:-

The below Query time(now ( )) return you the current time as field Timeonly. 

mysql> select time(now())as Timeonly;

Output:-

+----------+
| Timeonly |
+----------+
| 11:33:50 |
+----------+
1 row in set (0.00 sec)

Advertisements

Ads
Share on Google+Share on Google+

Mysql Time Only

Posted on: February 16, 2005 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Advertisements

Ads
 

Discuss: Mysql Time Only  

Post your Comment


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

Ads

 

Ads