473,434 Members | 1,791 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,434 software developers and data experts.

now() or current_timestamp() and the hours value in time

When I run select now(); or select current_timestamp(), I see the
output like "2005-04-19 02:50:14". By reading the documentation I
thought the the hour value should be in military format namely 14, but
instead I see 02. How can I fix this problem? I have MySQL 4.1.10a
database running on RH 9.0 server.
Thanks,
Yasaswi

Jul 23 '05 #1
1 3557
yasaswi wrote:
When I run select now(); or select current_timestamp(), I see the
output like "2005-04-19 02:50:14". By reading the documentation I
thought the the hour value should be in military format namely 14, but
instead I see 02. How can I fix this problem?


Read about the DATE_FORMAT() function on this page:
http://dev.mysql.com/doc/mysql/en/da...functions.html

You can force military-style 24-hour format by using the %H or %T format
specifiers.

Regards,
Bill K.
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

55
by: Elijah | last post by:
I have read many of the topics on learning C++ or Java first. It seems like everyone says something different. I would like to know if I should learn C++ or Java. First a little about myself. I...
4
by: John Siracusa | last post by:
How can I create a non-null date column that defaults to 'now' as computed at the time the row is inserted? -John ---------------------------(end of broadcast)---------------------------...
2
by: J M | last post by:
I rebooted a network device just few minutes ago and getting device-up-time value 3191. How do I convert a time elapsed in days hours minutes and seconds for above value? Example: This device...
4
by: John J. Hughes II | last post by:
I have several functions that save the time when they did certain tasks to an SQL table. This was working fine as far as I could tell but I now have systems that are updating thousands of records...
4
by: Peter | last post by:
Hi I am using DateTime class and TimeOfDay.Hours attribute to return current time. It returns right value on two servers, but in one particular server it does not return right time. I checked that...
0
by: CSN | last post by:
How do I update pg's date? It doesn't appear to have been updated with DST. I was under the impression that changing the system's date/time (date -s "...") would cause pg to use that. # date...
13
by: Stuart Bishop | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi. I'm trying to determine the best way of saying 'The current time in UTC with no time zone information'. I'm currently using...
22
by: Drum2001 | last post by:
I have a table that tracks employee times. I have a column (Date/Time). Users, through a form, enter how long it takes them to complete a task. For example, 03:45 = 3 hours and 45 mins. I am...
3
by: Stephen Chaplin | last post by:
I'm summing up time spent on jobs over a week, some of these jobs last greater than 24 hours and when access sums these up it appears that it starts again at 00:00 once it gets past 23:59. Is it...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.