|
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
|
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....
|
|
Yesterday, a computer program I wrote more than ten years ago ran into a snag. I won't go into detail, but what tripped it up is the fact that two consecutive dates, when written as YYYYMMDD, accidentally formed a third date.
January 20, 2012, was written...
Started by Cartoonacy on
, 13 posts
by 9 people.
Answer Snippets (Read the full thread at straightdope):
Correcting the syntax as necessary for each language (C/C++, Java, JavaScript, PHP, T-SQL, bash, perl.
|
|
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.
|
|
I'd like to use date time format string (possibly UTC) which is understandable and parsable on as many platforms and languages as possible? At least PHP, Python, Perl, Java, Rails and some common C++ library should be able to understand it.
Which one ...
Started by bh213 on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Preferably, YYYYMMDD HH:mm:ss [TZ] format.
Stick with ISO8601 and you can't go wrong.
|
|
Hier ist ein PhP Skript, welches die UDP-Pakete des EKEY-Systems interpretiert. Alle Ereignisse (erfolgreich/erfolglos) werden in eine Access-Datenbank abgelegt. Alle erfolgreiche Ereignisse werden auch via email verschickt. Mithilfe des Skripts ist es...
Started by aag on
, 8 posts
by 5 people.
Answer Snippets (Read the full thread at ip-symcon):
Besten Dank
Hans Zitat: Zitat von hans, Hallo aag,
Könntest....
Ich möchte dämnachst meine beiden Haustüren mit einen Fingerscanner ausrüsten .
Hallo aag,
Könntest bitte beschreiben mit welcher Version von ekey (home, multi oder net) dein Script funktioniert .
|
|
Hi,
I wrote a script to pick files based on some logic. when I execute my script, I get the below message ( I bolded the lines in the script where this error message shows up), it says that files are not available and it is a valid scenario if the files...
Started by Vijay81 on
, 7 posts
by 4 people.
Answer Snippets (Read the full thread at unix):
Below are the details you asked for:
env:
PHP Code: _ =/ bin/informatica/infa_shared/SCRIPTS/env_file.ksh
PHP Code: #!/usr/bin/ksh
# Define environment variables.
PM hi CTSGNB,
thanks for respnding.
|