Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQLite: get day

How can I return the day of a DateTime in SQLite?

I have my field Date stored as a DateTime. Now I would like get the day from each row (just the day, not the full date).

I tried using the following, but it doesn't work. It doesn't give an error, but it just returns nothing

SELECT strftime('%d', Date) FROM sessiondate
like image 373
Tjekkles Avatar asked Nov 27 '25 09:11

Tjekkles


1 Answers

SELECT strftime('%d', `Date`) FROM sessiondate

might work

like image 198
trickwallett Avatar answered Nov 29 '25 23:11

trickwallett