Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
blaneodonnell
Starting Member
1 Post |
Posted - 2015-03-18 : 07:36:48
|
hi folks. as part of my final year project for college I'm creating an app which tracks food in your kitchen and monitors the expiry date ill be creating a database using sql lite and building the app in Xcode. i was just looking for some help with the expiry side of things. if i have a table with food items. e.g. chicken... then add an expired date to that chicken e.g. 3 days. can i then have those 3 days on a timer... so when i open the app the following day the expiry will show 2 days?any help at all is much appreciatedblane |
|
gbritton
Master Smack Fu Yak Hacker
2780 Posts |
Posted - 2015-03-18 : 09:43:15
|
That logic belongs in your app, not the database. |
|
|
Kristen
Test
22859 Posts |
Posted - 2015-03-18 : 11:54:34
|
I don't see why not. Your database will either store "Start date" and "Lifetime" (in days, say) or "Expiry date"When you query SQL (from your APP) you can get that actual value back, or you could get [a calculation of] the number of days from "now" until "expiry". (You don't need a timer as such) |
|
|
|
|
|