Hi there!

You need to be logged in to view this course.

Tangent: Working with Dates

Bottom line: never trust a spreadsheet. You're going to hear me say that a lot in this production! Especially when it comes to dates.

Postgres is pretty good at dealing with dates... in fact it's amazingly powerful as well as correct:

select now(); -- what date and time is it where my server is located?
select now() + '1 day' as tomorrow; -- adding an interval is extremely easy
select now() at time zone 'America/New_York'; -- specifying a timezone

If you're reading this in a browser, which I assume you are, open up the developer tools using CMD-shift-i (or Ctrl-shift-i on Windows) and open the console.

To see a typical date for JavaScript (and many other languages):

new Date() //prints out a long-form date

To see an ISO date, which most databases like, you can use:

new Date().toISOString();

This is a format you should let your eyes get used to.