22, November 2008

convert standard time to php time() - webmaster forum

 
Webdigity webmaster forums
This forum shares its ad revenue with its members!
[ 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

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



« on: May 08, 2007, 09: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, 09:40:19 AM by Meth0d »

Visit through proxy Visit through proxy Visit through proxy

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


It's time to use PHP5!


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

and what is your question?


Last blog : Just a better Internet portal provided by Google
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 8249
42481 credits
Members referred : 3



« Reply #2 on: May 08, 2007, 09: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() Visit through proxy

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

Last blog : Free Unlimited Bandwith and disk space to good to be true?
aka J Love
Community Supporter ?
Bill Gates is my home boy
*****
Gender: Male
Posts: 884
1636 credits
Members referred : 4



« Reply #3 on: May 08, 2007, 07: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.

Visit through proxy Visit through proxy Visit through proxy

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


It's time to use PHP5!


« Reply #4 on: May 08, 2007, 08: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...


Last blog : Just a better Internet portal provided by Google
aka J Love
Community Supporter ?
Bill Gates is my home boy
*****
Gender: Male
Posts: 884
1636 credits
Members referred : 4



« Reply #5 on: May 08, 2007, 08: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

Visit through proxy Visit through proxy Visit through proxy

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


It's time to use PHP5!


« Reply #6 on: May 08, 2007, 08: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)


Last blog : Just a better Internet portal provided by Google
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....

Topic sponsors:
Get a permanent link here for $1.99!


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?
Nov 22, 2008, 03:07:15 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!


Forum Statistics
Total Posts: 37.736
Total Topics: 7.650
Total Members: 4.397
Tutorials : 56
Resources : 143
Designs : 220
Latest Member: Janai

40 Guests, 5 Users online :

11 users online today:



Readers

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