sprintf date type specifier

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
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

sprintf date type specifier

Post by aceconcepts »

Hi,

I am trying to insert some data into a MySQL database. One field is formatted as DATE, how do insert my date value variable into the table using sprintf?

My date to be inserted is stored in one single variable, not three.

Thanks.
User avatar
dude81
Forum Regular
Posts: 509
Joined: Mon Aug 29, 2005 6:26 am
Location: Pearls City

Post by dude81 »

pass date as a string, use %s for sprintf
Post Reply