This is a discussion on Flipping date in php within the PHP Programming forums, part of the Web Development category; I have seen that many people are searchign for date formatting for dd-mm-yyyy format while mysql default supports ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| I have seen that many people are searchign for date formatting for dd-mm-yyyy format while mysql default supports yyyy-mm-dd , here is a function which flip the date. I hope you will find it useful <?php function flipdate($dt, $seperator_in = '-', $seperator_out = '-') { return implode($seperator_out, array_reverse(explode($seperator_in, $dt))); } ?> |
| Sponsored Links |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Convert a date in milliseconds back to a date string | itbarota | HTML, CSS and Javascript Coding Techniques | 2 | 03-03-2008 09:03 PM |
| How can I show the documents last modified date in the format: month, date, year, tim | Pvinothkumar | HTML, CSS and Javascript Coding Techniques | 3 | 12-28-2007 05:58 AM |
| How can I compare a date in a string with todays date? | itbarota | HTML, CSS and Javascript Coding Techniques | 2 | 12-18-2007 11:02 PM |
| How to find the Starting date of week from a particular date | kingmaker | C# Programming | 1 | 08-16-2007 11:25 PM |
| How to convert a date to a globally accepted date format, in DOT NET 2005? | Archer | C# Programming | 1 | 07-25-2007 03:21 AM |