Posted on 1998-09-16
My previous applications runs in access2.0 wherein there is an built-in function "DateSerial"
which has an syntax like : DateSerial(year,month,day)
In my Sql Server I have an function lllr to this called "DateAdd".
Syntax : DateAdd(year,period,getdate())
In my case the month and day fields are 2 different fields which has smallint as datatype.
I have to add some integer values to month and day fields and concatenate with year field. The final result should return me the date in dd/mm/yyyy format.
For Eg. Year - 1998
Month - 08 (Smallint Datatype)
Day - 16 (Smallint Datatype)
Add 7 to month field and 42 to Day field.
Taking today's date as "16/08/1998"
The final output should be "27/03/1999"
I need the entire stuff of sql code ..
Can anyone help me out in this regard.