| | |
csv, convert date, mysql, php
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
First you calculate a timestamp integer from the old date (that is the number of seconds from January 1, 1970 00:00:00 GMT to the old date).
Then you call the php function date() with a format string and pass in the timestamp. Like so:
See here for more information on using date format strings.
Then you call the php function date() with a format string and pass in the timestamp. Like so:
php Syntax (Toggle Plain Text)
$datestring = date("Y-m-d", $timestamp);
See here for more information on using date format strings.
First, you fetch the data from the csv file using fgetcsv. Its returns the value as an array. Access the array element where the date is stored and do as scru has mentioned.
Ignorance is definitely not bliss!
*PM asking for help will be ignored*
*PM asking for help will be ignored*
![]() |
Other Threads in the PHP Forum
- Previous Thread: page by page
- Next Thread: DB Column contains commas
| Thread Tools | Search this Thread |
# 5.2.10 access action address alexa apache api array auto autoincrement broken cakephp checkbox class classes clean clients cms code cron curl database date dehasher destroy directory dissertation domain dynamic echo$_get[x]changingitintovariable... email encode error errorlog fairness fatalerror file folder form function functions google href htaccess html image include indentedsubcategory ip javascript joomla legislation limit link load local login masterthesis memberships menu multiple multipletables mysql mysqlquery newsletters oop open passwords paypal pdf persist php popup provider query radio random script search secure server sessions simple sockets source space spam sql system table tutorial upload url user variable video voteup web youtube






