Click here to Skip to main content
15,889,909 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
1) Use the strftime function with the date 2019-04-01 and display the date along with the time.

2) Use THE strftime function with the date 2019-04-01 and add 2 years to the given date, add 180 minutes to that date.

What I have tried:

1) select strftime('%Y-%m-%d %H:%M:%S','2019-04-01');


2) select strftime('%Y-%m-%d %H:%M:%S','2019-04-01','+2 years','+180 minutes');
Posted
Updated 27-Sep-19 1:03am
Comments
CHill60 4-Jul-19 3:31am    
And what is your question?
Tej K 4-Jul-19 3:45am    
What i tried was correct or wrong?
CHill60 4-Jul-19 3:47am    
What happens when you run it?

Quote:
What i tried was correct or wrong?

We aren't here to test your homework: that's really up to you.
So load up an SQLite manager (I use SQLiteStudio: SQLiteStudio[^]) and test it!
Run your queries, and check if what it returns matches what your tutor has asked you to produce. If it exactly does, then it's right. Otherwise ... you can guess the rest!
 
Share this answer
 
You can try this, it worked

SELECT strftime ('%Y-%m-%d %H:%M:%S','2019-04-01','+2 year','+180 minute');
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900