Join Bill Weinman for an in-depth discussion in this video Performing date and time arithmetic, part of PostgreSQL 9 with PHP Essential Training.
Postgres supports arithmetic on dates and times, using standard…arithmetic operators.…For example, I can simply say SELECT DATE, today's date, minus another date, and…it will give me the number of days in between.…Or instead of another date I can give it an INTERVAL, say 6 days and it will…give me that other date, or I can do all of this with TIMESTAMPS.…
And so here I'm taking a date and time and I am subtracting 6 days 3 hours and 15 minutes.…And it gives me a very specific date and time that's exactly 6 days 3 hours…and 15 minutes earlier.…So this is a very convenient feature and it allows us a lot of flexibility in…how we handle dates and times in our SQL code.…
- Installing PostgreSQL
- Understanding database architecture
- Inserting, updating, and deleting data in a table
- Creating a database library
- Indexing ID fields
- Storing numbers, text, and Boolean values
- Reading data
- Using casts to force type
- Using mathematical functions
- Concatenating strings
- Working with date and time functions and operators
- Defining CRUD
- Using PHP to insert, read, update, and delete rows in a database
Skill Level Beginner
PHP with MySQL Beyond the Basicswith Kevin Skoglund10h 26m Intermediate
1. Quick Start
2. Creating a Database
3. Data Types
4. Storing and Reading Data
5. SQL Expressions
6. Mathematical Functions and Operators
Using math functions3m 2s
7. String Functions and Operators
8. Date and Time Functions and Operators
9. PHP Interfaces
10. Web Applications
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
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.