Closed sscrewston closed 1 year ago
Try selecting game.game_date instead of strftime.
game_date
was the alias I gave the strftime
. I used strftime
to extract the date value only from the date column because by default it is a string value in YYYY-MM-DDT00:00:00
format. In default format I can't sort the date properly so I'm trying to figure out a solution with my limited knowledge of SQL.
I think strftime returns the current date. You might want game.game_date, if you want a game's date.
Or maybe pass it to strftime. Like
strftime(format, game.game_date)
Okay, thank you. I’ll try that when I get a chance.
On Fri, Nov 18, 2022 at 8:13 AM Matthew Pope @.***> wrote:
Or maybe pass it to strftime. Like
strftime(format, game.game_date)
— Reply to this email directly, view it on GitHub https://github.com/mpope9/nba-sql/issues/84#issuecomment-1320046500, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZFVOKBBVGHPY2NEQZMNGT3WI6FG5ANCNFSM6AAAAAASED3PGI . You are receiving this because you authored the thread.Message ID: @.***>
I'm still fairly new to SQL, I used this query
However, when I retrieve that
game_date
column I see dates from one day ahead, games that haven't even happened yet. What am I doing wrong?