Quick Search:
CODE
Oracle PL/SQL Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
 PHP Code: Convert UK Dates To mySQL Format Dates Jump to:  
Category: >> PHP Code >> Convert UK Dates To mySQL Format Dates Bookmark and Share

<< lastnext >>

Snippet Name: Convert UK Dates To mySQL Format Dates

Description: Handy function that will convert a UK date style (dd/mm/yyyy) into a into a mySQL format (yyyy-mm-dd).

Also see:
» Format money as millions, billions, et...
» BR2NL Function - Opposite of NL2BR
» Get Relative Dates and Times
» Convert Seconds to Hours:Minutes:Secon...
» Export mySQL results to CSV
» Convert UK Dates To mySQL Format Dates
» Convert miles to feet, feet to miles, ...
» Search All Words Of A String In mySQL
» Calculate the difference between two t...
» Output mySQL data in columns
» FUNCTIONS: date/time
» RMAN: Format Directives
» USER - connection information
» USER - User Information 2
» USER Information
» SQL*Plus formatting
» Get Date 30 days ago
» Create string by formatting an amount ...
» Perl SQL Update Example
» SELECT: Select For Update
» TO_DATE
» UPDATE: Update a partitioned table
» UPDATE: Update based on a record
» UPDATE: Update Object Table
» UPDATE: with RETURNING clause
» UPDATE: Nested Table Update example
» UPDATE: Correlated Update
» UPDATE: Update from a SELECT statement
» UPDATE: based on multiple returned val...
» UPDATE: Update based on a query

Comment: (none)

Language: PHP
Highlight Mode: PHP
Last Modified: March 16th, 2009

FUNCTION uk_date_to_mysql_date($date){
 
$date_year=SUBSTR($date,6,4);
$date_month=SUBSTR($date,3,2);
$date_day=SUBSTR($date,0,2);
$date=DATE("Y-m-d", MKTIME(0,0,0,$date_month,$date_day,$date_year));
RETURN $date; 
 
} 
 
// $row['date'] is in the form: yyyy-mm-dd.
ECHO uk_date_to_mysql_date($row['date']); 


Free
Oracle Magazine
Subscriptions
and Oracle White Papers


SQL University.net courses meet the most demanding needs of the business world for advanced education in a cost-effective manner. SQL University.net courses are available immediately for IT professionals and can be taken without disruption of your workplace schedule or processes.

Compared to traditional travel-based training, SQL University.net saves time and valuable corporate resources, allowing companies to do more with less. That's our mission, and that's what we deliver.

Click here to find out more
 
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 68 users online    © 2009 psoug.org

PSOUG LOGIN
Username: 
Password: 
Forgot your password?