Join Bill Weinman for an in-depth discussion in this video Storing dates and times, part of PostgreSQL 9 with PHP Essential Training.
Postgres provides a simple set of time and date types for storing and working…with time, dates, and intervals.…The most common of these is probably the timestamp type, which stores both a…date and time, with or without time zone.…So here we've created a table with two columns:…a is the regular timestamp and b is a timestamp with the time zone. And we're…inserting into it some values. And it's useful to note that these were all 3 PM…in two different time zones.…
The first row is 3 PM as 15:25 in Eastern Daylight Time, or 3:25 PM spelled out…that way in Eastern Daylight Time; and the second row is 3:25 PM as 15:25 UTC,…UTC being the international designation for Greenwich Mean Time, or spelled out as 3:25 PM.…And as Postgres works, there are a lot of different ways that you can specify a…time string and it will interpret most of them really, really well.…
So here I've just used two of them with the 24-hour time and the 12-hour time…with a AM or PM designation.…So we'll go ahead and run this, and it's interesting what happens.…
- 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
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.