im sending jquery date value and database cannot update the current format so i need php date conversion pls anyone suggest me

Recommended Answers

What format are you sending?

Jump to Post

All 2 Replies

What format are you sending?

Use strtotime(), you can do it like this:

$date = date('Y-m-d', strtotime($_POST['date'])) . ' 00:00:00';

And use a datetime field, since the timestamp:

The TIMESTAMP data type is used for values that contain both date and time parts. TIMESTAMP has a range of '1970-01-01 00:00:01' UTC to '2038-01-19 03:14:07' UTC.

http://dev.mysql.com/doc/refman/5.1/en/datetime.html

bye!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.