473,406 Members | 2,954 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,406 software developers and data experts.

how to convert time from (yyyy-mm-dd hh:mm:ss) this format to simply (hh:mm:ss) ?

127 100+
i have stored the user break times in the database...

user break start time and end time...

the timestamp stored in the database in the (yyyy-mm-dd hh:mm:ss) format in the database...

when i retrieve the time from the database the time will be like this...
2010-10-26 10:00:39

but i want only the time part. i.e 10:00:39
i dont want the date..

how to get only the time from the database? plz help?
Oct 26 '10 #1
2 4987
try..

SELECT TIME(timefield) AS time FROM table WHERE somethingsomething
Oct 26 '10 #2
kovik
1,044 Expert 1GB
Or, since you're asking in the PHP forum:
Expand|Select|Wrap|Line Numbers
  1. echo date('H:i:s', strtotime($mysql_date));
Oct 26 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Krzysztof Skibniewski | last post by:
Hello, I'm trying find out how to obtain and output that format ( hh:mm:ss.fff ) in my ASP. if somebody knows, pls let me know.. thx kris
6
by: KathyB | last post by:
Hi, not too swift with anything other than simple SQL statements, so I'm looking for some help. Using SQL Server 2000 with this stored proc: (@varCust varchar(50)) AS SET NOCOUNT ON
2
by: Robert Brown | last post by:
Hi all. I have written a program that transfers data via FTP. I can calculate the rough amount of time left. I get a value such as 70.83 seconds left for instance. What I want to do is to...
14
by: Michael Barrido | last post by:
I have this for example: Dim iSeconds as int32 = 3600 '3600 seconds is one hour How do i convert it to "01:00:00" ? Please help. Thanks in advance!
5
nirmalsingh
by: nirmalsingh | last post by:
i am getting date format in string as 30-11-2006 05:59:44 PM . i want to convert in the format of yyyy-mm-dd hh:mm:ss to sore it in mysql database. Help me with sample coding plz..
1
by: unknown66 | last post by:
hello, I have a time value in unix time that I would like to convert into a time format of hh:mm:ss:ms. For example, I have this number, 1172234138451, that I would like to be in the hh:mm:ss:ms...
1
seshu
by: seshu | last post by:
Hi every body to morning my cousine has show his application and also his live db in that to sav the length of all the voice files he has saved in time format ie he took the datatype of time now i...
1
seshu
by: seshu | last post by:
Hi every body to morning my cousine has show his application and also his live db in that to sav the length of all the voice files he has saved in time format ie he took the datatype of time now i...
5
by: sudip77 | last post by:
Hi, I have an user input variable called @stop_time which takes input in the format of HH:MM:SS. I need to convert it into seconds only. How can I do that? Can anyone help please?
11
by: neelsfer | last post by:
how add (longtime) totaltime = + in query; i need to be able to add more than 24hrs also but it can still show in this format ie (hh:mm:ss) 31:10:20 = 31hrs 10min 20sec pls help
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...

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.