Changes

Jump to: navigation, search

Working with Dates and Times in MySQL

776 bytes added, 15:37, 23 October 2007
Date and Time Functions
</table>
 
== Inserting Date and Time Values into Table Columns ==
 
Now that we have looked at how dates and times are formatted in MySQL and also explored the vast array of functions that are available manipulate date and time values it is now time to look at how to insert date and time values into table. To demonstrate this concept we will continue to use the ''orders'' table we created at the beginning of this chapter.
 
We will begin by adding a new order row. The order_no field will auto increment so we need to provide an order_item, an order date and a delivery date. The order date is the time that we place the order, so we can use the ''NOW()'' function to place the current date and time into the row.
 
The delivery date will be some period of time after the order date.

Navigation menu