How can I subtract (or add) days from a dateandtime or smalldatetime date in Web SQL? I have tried searching for it, but couldn't find anything.
The solutions that exist are all for SQL and MySQL.
I have tried: DATEADD (SQL), and DATE_ADD/DATE_SUB (MySQL) functions.
Both are giving errors (even when I copy paste simple example statements), when I use them on my web page.
Try (change now for te time string, or leave now to add or substract from today)
SELECT date('now','+1 day');orSELECT date('now','-1 day');EDIT:
If you want to add or substract to an specific day, you would need to format the date as following
then you could use
dateordatetimeand add/substract the day. Using the data from the comment: