|
I have dates in the following format (yyyymmdd, 18751104, 19140722)... what's the easiest way to convert it to date().... or is using mktime() and substrings my best option...?
Started by Serhiy on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Use strtotime to convert a string containing a date to a Unix timestamp :
<?php // both lines the result as the second parameter to date() to reformat the date yourself:
<?php // prints 1995;?php // Returns the year as an offset....
|
|
Note: In the MySql database, "dob" is varchar and in this format: mm/dd/yyyy
Date of birth, Cvrg Effective Date, & Cvrg Expiration Date need to be changed from mm/dd/yyyy to yyyymmdd when it arrives in excel. Any help is greatly appreciated. Please see...
Started by Willy on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
And strtotime as follows:
// convert old date string to YYYYmmdd format $date = date('Ymd', strtotime($old.
|
|
What I want to do is make a script on the server read a text file, sort it, then output it to a javascript object (probably via JSON). The text file in question looks something like this:
13/09/2009,17/09/2009,Arbitrary dates 14/09/2009,18/09/2009,Some...
Started by Eric on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Divide the output of the javascript by 1000 or use something like mydate = new Date(); mydate... .
(); mydate.getTime(); //timestamp mydate.setTime(your_timestamp); //set using timestamp
in php the date function, and the php functions use seconds.
|
Ask your Facebook Friends
|
Posted 08 May 2012 - 09:27 PM
Hello
Have started to format an email form but now am a little stuck
My link
Just wondered if anyone knows what it is I am doing wrong. Totally new to PHP forms and all that malarkey.
Any ideas?
Thank you
Started by smortimer on
, 7 posts
by 3 people.
Answer Snippets (Read the full thread at webdesignerforum):
The "send email to "quotation.php"? Posted 09 May 201....
Posted 09 May 2012 - 08:18 AM
andyl, on 08 May 2012 - 10:21 PM, said:
First off, use .php extension, not .html.
Posted 08 May 2012 - 10:21 PM
First off, use .php extension, not .html.
|
|
What is the best way in php to take the following string mm[some char]dd[some char]yyyy and translate it to yyyymmdd? I will probably want in the future, according to local do the same with dd[some char]mm[some char]yyyy.
If there is a way that already...
Started by Itay Moav on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Quite frankly though, the PHP functions are a lot simpler.
$new_str = date('Ymd out some examples and documentation here.
Lt;?php $str = '08-24-1989'; // can be in any recognizable date format.
|
|
I'm migrating my library's website from webcal to google calendar. The site is written in PHP and HTML4.01 (moving from transitional towards strict). Is there a programatic way that I can generate links to calender days/entries? With webcal a link to ...
Started by aslum on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
For days.php, you could do something similar to:
<?php /** * Adapted from google API doc; <h1> <?php print $day; ?> </h1> <ul id="days-events"> <?php foreach ($eventFeed as $event): ?> <li class....
|
|
Ciao a tutti!
Per la maggior parte di voi sarà banale ma dall'alto della mia "ignoranza" mi trovo di fronte a questo problema:
in una pagina php ho un form che mi permette l'inserimento di dati all'interno di una tabella. E fino qui tutto bene.
All'interno...
Started by Righez on
, 1 posts
by 1 people.
Answer Snippets (Read the full thread at giorgiotave):
|
|
On 22 May 2009 15:51:01 -0500, Scott Coffey <none@noemail.com.invalid
I'm trying to write a program that will archive selected files to an
archive directory. The files in the archive directory will have a
prefix in the format yyyymmdd-hhmmss-filename...
Started by Scott Coffey on
, 12 posts
by 6 people.
Answer Snippets (Read the full thread at omgili):
Smith
On 22 May 2009 15:51:01 -0500 + "\" + ;
"yyyymmdd-hhmmss-" + cFilename + "
and RUN it with your preferred execute function/command of files in....
Of directory()?
http://www.ousob.com/ng/53guide/ng38a9b.php
David A.
|
|
Queries about the meta tags section in the portal by AMD » 12 Sep 2009 20:39
Your phpBB Version: 3.0.5
Your phpBB Type: Standard phpBB3 (also called Vanilla Olympus (phpBB 3.0.x))
MODs installed: Yes
Your knowledge: Basic Knowledge
Boardlink: http://www...
Started by AMD on
, 1 posts
by 1 people.
Answer Snippets (Read the full thread at portalxl):
|
|
Repeating answers is a pain in the butt. So let's collect all the common questions that pop up on a weekly basis and compile them into one big thread.
Please note that this thread does not deal with PHP or SQL problems. You're required to solve those ...
Started by Tsukasa on
, 1 posts
by 1 people.
Answer Snippets (Read the full thread at ragezone):
|