Post Changed Date

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
raggy99
Forum Newbie
Posts: 13
Joined: Mon Aug 14, 2006 6:52 am

Post Changed Date

Post by raggy99 »

What I am wanting to do is on the website input the date as (Date/Month/Year) however i need to convert this to (Year/Month/Day) for mysql when i record it.

ATM when i put input on the website 25/12/2009 in the database it shows 0000-00-00

your help would be greatly appreciated.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Post Changed Date

Post by requinix »

So split the string on the slashes and reassemble them as you want.


It'd actually be better if you got the month, day, and year separately. Then there's no chance of month/day confusion.
raggy99
Forum Newbie
Posts: 13
Joined: Mon Aug 14, 2006 6:52 am

Re: Post Changed Date

Post by raggy99 »

tasairis wrote:So split the string on the slashes and reassemble them as you want.


It'd actually be better if you got the month, day, and year separately. Then there's no chance of month/day confusion.

I should of said that i'm doing this in dreamweaver and I am a total noob.

could you post come date code and then i might be able to get my head around it?

thx
Post Reply