473,320 Members | 1,600 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,320 software developers and data experts.

PHP conversion of time format

hi, can any one told me how to convert time into my own time format. Please give me valid suggestion i already tried very best but failed. .
e.g i have time like this 17:41:41(H:i:s) so i want to convert into like this 5:41 pm. format is (g:i a).
i will very thankfull if any one help me.
Sep 13 '11 #1

✓ answered by code green

Use strtotime() to cast time string to a timestamp,
then the time can be formatted with date()

2 1534
code green
1,726 Expert 1GB
Use strtotime() to cast time string to a timestamp,
then the time can be formatted with date()
Sep 13 '11 #2
Thanks code green. it is helpful for me.
Sep 13 '11 #3

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

Similar topics

1
by: Bruce Cushman | last post by:
My DB is Access 2000 based "possibly written in 2002" and I have to send and receive update files, ported to a UNIX server by FTP, DB unknown. The file content uses a fixed length string, zero...
1
by: seash | last post by:
H when i execute this query, my query is crashing throwing an exception "cant convert char datatype to datetime type format my query is "insert into mytable(mydate) values ('"+ varmydate+ "')...
3
by: Just D | last post by:
Did anybody see this bug? I tried to reproduce that using 12-hour and 24-hour system settings. Anyway it still causes a problem in VS2003. When I convert DateTime to a string using default...
5
by: Takeadoe | last post by:
Gang - I'm generating date and time variables from scanned forms. Currently, the date and time values are as follows: 06/26/2006 and 11:30 AM. I've written VBA code to combine them into a...
5
by: Julia | last post by:
Hi I have changed my regional options on my computer to English (United States) (I used to have Swedish). I would print the value of the current time in a textbox on my asp.net page. I use this...
5
by: rouven | last post by:
Hi, i am trying to convert that time format '05:26:40 Jun 19, 2007 PDT' into mysql compatible format like YYYY-MM-DD HH:MM:SS. the code i tried was: from datetime import datetime from time...
23
by: tatata9999 | last post by:
Hi, What time zones tend to use 24 hours time format? Googling hasn't been able to answer the question. Thank you.
10
by: nussu | last post by:
Hi , i have 4 textbox's vertically , in that in first 3 textbox's i am entering values in time formati.e in HH:MM:SS .There is no am/pm after time format. for ex : a textbox has to accept only...
18
by: Dirk Hagemann | last post by:
Hello, From a zone-file of a Microsoft Active Directory integrated DNS server I get the date/time of the dynamic update entries in a format, which is as far as I know the hours since january 1st...
3
by: smitanaik | last post by:
hi help me out to convert this unix time format into windows in java ex. 1075329297.572 (unix time format)
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.