What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » database help

database help
Author: Message:
Adeptus
Senior Member
****


Posts: 732
Reputation: 40
Joined: Oct 2005
RE: database help
Hi,

You don't need an additional column in your database table for this -- you can compute it at any time, from what's already there. Use SQL functions datediff(), dateadd() and getdate().  The query might look something like this:

select DateRegistered, LastUpdated, datediff('d', getdate(), dateadd('yyyy', 1, LastUpdated)) as DaysLeftToRenew from MyTable

The above would evaluate to the difference (in days) between the current date and LastUpdated + one year, which sounds like what you want. 

This post was edited on 02-17-2006 at 02:59 PM by Adeptus.
02-17-2006 02:42 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
database help - by spokes on 02-15-2006 at 05:33 PM
RE: database help - by Adeptus on 02-17-2006 at 02:42 PM
RE: database help - by RaceProUK on 02-17-2006 at 02:57 PM
RE: database help - by Adeptus on 02-17-2006 at 03:02 PM
RE: database help - by RaceProUK on 02-19-2006 at 10:47 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On