Page 1 of 1

date Function - String Formatting

Posted: Wed May 07, 2008 2:47 pm
by Glycerine
Hi -

New Guy - New forum to new - not new to php. You seem a stunning font of knowledge.

My question regards the date() function.

I would just like to know which characters need to be slashed out when printing. I have built a function which utilizes the date() function, and it see's the type of delimiter a user enters on input and replicates it in a specific format.

e.g
User enters "1/2/08" >> translates >> "01/02/2008"
User enters "1 2 08" >> translates >> "01 02 2008" etc...

The function has other specifics but I'm to lazy to type them. So anyone know which characters need slashing and which dont?

Hope it makes sense - English is my fist language I swear

Thanks In Advance

Re: date Function - String Formatting

Posted: Wed May 07, 2008 3:52 pm
by kendall
http://www.php.net/manual/en/function.date.php

the format characters for one.