It takes two arguments:
strftime(format, column)
- To get an hour: strftime('%H', column_name)
- To get the year: strftime('%Y', column_name)
- To get the month: strftime('%m', column_name)
- To get the day: strftime('%d', column_name)
- To get the minute: strftime('%m', column_name)
- To get the second: strftime('%S', column_name)
The above is true as long as the time format is YYYY-MM-DD HH:MM:SS
More on this function can be read from the SQL documentation here.
No comments:
Post a Comment