To get the current year, use:
SELECT DATE_FORMAT(NOW(), '%Y');
Basically you can use the DATE_FORMAT to show the present time as
desired.
--bmansell
-----Original Message-----
From: Greg Hosler [mailto:[EMAIL PROTECTED]
Sent: Friday, April 23, 2004 5:08 PM
To: [EMAIL PROTECTED]
Subject: Is it possible to get a timestamp from the server ?
Hi,
I have a database application that I am porting to MySQL. one of the
things that the application needs to do is to get a timestamp from the
server, so that all instances of the application across a network can
timestamp cewrtain records using a common source for the timestamp. e.g.
the sql server.
In the past, under Informix, we did the following sql:
SELECT distinct current year to second FROM systables
I've looked around, and I'm not seeing anything equivalent under MySQL.
Have I hopefully missed something ?
thx for any suggestions / hints / pointers.
best rgds,
-Greg Hosler
+---------------------------------------------------------------------+
You can release software that's good, software that's inexpensive, or
software that's available on time. You can usually release software
that has 2 of these 3 attributes -- but not all 3.
| Greg Hosler [EMAIL PROTECTED] |
+---------------------------------------------------------------------+
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]