Share on Google+Share on Google+

Mysql Time Only

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

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

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

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Discuss: Mysql Time Only  

Post your Comment


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