28, May 2012

convert standard time to php time() - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: convert standard time to php time()
« previous next »
Pages: [1] Print
Instabuck - The easy way to sell digital products online

Author Topic: convert standard time to php time()  (Read 2786 times)
aka J Love
Community Supporter ?
Bill Gates is my home boy
*****
Gender: Male
Posts: 886
1148 credits
Members referred : 4



« on: May 08, 2007, 08:36:22 am »

for example, i say i have a date that is formatted in some data like so:

Quote
05/07/2007 20:15:00

is it possible with PHP, or some script or function that has already been written by a php King like nikolas  Grin, to convert that time automatically to what php function.time will return? such as the above being:

Quote
1162165466

Please note for this example, the 2 dates shown in both formats are not identical or of equal value. The 2nd one is just randomly pressed keys that "looks" like what the php function.time returns.

This would of course be the same as just using date("M/D/Y H:M:S") or whatever it may be, but doing it "backwards" in a way, like what i wanted from the substr function before  Tongue
« Last Edit: May 08, 2007, 08:40:19 am by Meth0d »


Last blog : phpHaze 1.59.1 in Development
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #1 on: May 08, 2007, 08:41:02 am »

and what is your question?

I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5799
46391 credits
Members referred : 3



« Reply #2 on: May 08, 2007, 08:43:18 am »

A php king, lol Tongue

To do this you will have to parse the date you have and pass it to mktime()

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
aka J Love
Community Supporter ?
Bill Gates is my home boy
*****
Gender: Male
Posts: 886
1148 credits
Members referred : 4



« Reply #3 on: May 08, 2007, 06:53:12 pm »

ah, so there IS already a function that does this, after reading the manual from php.net i cant believe i didnt notice this before Tongue thanks again Nik!, this is precisely what i was looking for.


Last blog : phpHaze 1.59.1 in Development
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #4 on: May 08, 2007, 07:24:42 pm »

ah, so there IS already a function that does this, after reading the manual from php.net i cant believe i didnt notice this before Tongue thanks again Nik!, this is precisely what i was looking for.

yes there is a list of related functions in the left side bar...

aka J Love
Community Supporter ?
Bill Gates is my home boy
*****
Gender: Male
Posts: 886
1148 credits
Members referred : 4



« Reply #5 on: May 08, 2007, 07:25:59 pm »

ah, so there IS already a function that does this, after reading the manual from php.net i cant believe i didnt notice this before Tongue thanks again Nik!, this is precisely what i was looking for.

yes there is a list of related functions in the left side bar...

i did not know Webdigity had its own clean version of the php.net manual Olaf, until i posted this thread.. but now i do Smiley and use it alot


Last blog : phpHaze 1.59.1 in Development
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #6 on: May 08, 2007, 07:30:29 pm »



i did not know Webdigity had its own clean version of the php.net manual Olaf, until i posted this thread.. but now i do Smiley and use it alot

my comment was not about the php manual on webdigity, but about how to use the php manual in general. If you read about some function you have always links related functions on the same page.

I read the manual every day and there is every week some new function I never saw before (I know only 20-40 functions with all the arguments)

Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=6535
Tags : php time date function Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: convert standard time to php time()
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 10:25:45 pm





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!






Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2012 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.