Join Bill Weinman for an in-depth discussion in this video Formatting dates, part of MySQL Essential Training (2014).
…The date format function is used for formatting…date and time values as strings for display.…We're not going to select a database for this lesson.…For example, if I say SELECT DATE FORMAT, and…I'll use the NOW function for current time stamp.…And I'll put a FORMAT string in single quotes.…And when I press Go, we get a…formatted date that says Thursday, 27th of March, 2014.…
The…date format function takes two arguments.…The first argument is a date.…In this case, we're passing it the current.…Time stamp with the NOW function.…And the second argument is a string with formatting instructions.…It's called a format string.…And each of these format specifiers has a percent sign and a…letter indicating what format option it represents.…Here's a list of the various format specifiers available.…
I suggest you experiment a lot to become familiar with it.…As another example, here's a format that would give us a standard SQL date.…This is.…Fairly common and useful.…Percent capital Y, percent m, and percent d, with…dashes in between them for the year, month and day.…
- Writing queries
- Creating and updating databases and tables
- Using MySQL built-in functions
- Sorting and filtering data
- Updating tables with triggers
- Working with subselects and views
- Creating and using a stored function
Skill Level Beginner
1. Installing and Configuring the Test Environment
2. Basic Syntax
3. Creating a Database
4. MySQL Data Types
5. MySQL Functions
8. Subselects and Views
9. Stored Routines
10. PHP's PDO Interface with MySQL
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.