SQLite Date format

I am using SQLite and want to show the day of the month in a number format.  I need to use the current day.  I was trying to sysdate and get the day of the month from that, but that is not working.  Here is what I was trying: SUBSTR(sysdate,1,2)

Anyone have any ideas?

Thank you very much for your time.

Try using strftime(’%d’,‘now’)

Can you please explain what the ‘now’ modifier is doing in this case.  I stumbled on this while looking in the SQLite.org site, but got it working without the modifier.  I will put it in if it will eliminate errors or other problems that might arise, but I would like to know what those might be if you can.

THANKS A MILLION!!!

I believe ‘now’ is the timestring not the modifier. It is providing the current day/time input to the strftime function. See following site for some good insight and examples.

http://www.tutorialspoint.com/sqlite/sqlite_date_time.htm

Thanks for the help!  It works great!

Try using strftime(’%d’,‘now’)

Can you please explain what the ‘now’ modifier is doing in this case.  I stumbled on this while looking in the SQLite.org site, but got it working without the modifier.  I will put it in if it will eliminate errors or other problems that might arise, but I would like to know what those might be if you can.

THANKS A MILLION!!!

I believe ‘now’ is the timestring not the modifier. It is providing the current day/time input to the strftime function. See following site for some good insight and examples.

http://www.tutorialspoint.com/sqlite/sqlite_date_time.htm

Thanks for the help!  It works great!