Computing.Net > Forums > Database > Date function

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Date function

Reply to Message Icon

Name: Tony Short
Date: May 7, 2009 at 08:51:06 Pacific
OS: Windows XP
Subcategory: MS SQL Server
Comment:

I have a table which stores a date value. From this value I want to do a select statement which adds 28 days to the value in my table.

I understand the getdate() function but I'm unable get a select which will do this.

I guess in simple terms it will be select date from table having added 28 days????

I'm using MS SQL 2005.

Big Thanks

Tony



Sponsored Link
Ads by Google

Response Number 1
Name: ChrisF
Date: May 26, 2009 at 10:27:48 Pacific
Reply:

Use the dateadd function

Select DataAdd( d, 28, columnname) from tableName

GetDate() gives you the current date.


0

Response Number 2
Name: raj123
Date: October 2, 2009 at 01:32:20 Pacific
Reply:

hello i have a table field DOB i want to enter date in DOB field not more than 18 years reference date is today


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More






Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: Date function

Validation Rule for Date www.computing.net/answers/dbase/validation-rule-for-date/25.html

How to Find day for 3 months date using Mod f www.computing.net/answers/dbase/how-to-find-day-for-3-months-date-using-mod-f/644.html

Dynamic functions in Access 2003 www.computing.net/answers/dbase/dynamic-functions-in-access-2003/326.html