Public Function RaceDate(length As Integer ) As String dim year As string=0 dim month As string=0 dim day As string=0 dim ReturnString As string ReturnString="" If length = 0 then Return String.Empty end if if length >= 365 year=cstr((Math.Floor (length / 365))) length =(length Mod 365) end if If length >= 30 AndAlso length < 365 Then month =cstr((Math.Floor(length / 30 ))) length =(length Mod 30) end if if length < 30 Then day =cstr(length) End If If cint(year) >0 ReturnString= year+" Years " End if If cint(month) >0 ReturnString= ReturnString +month+" Months " End if If cint(day) >0 ReturnString = ReturnString+day+ " Days " End if Return (ReturnString) End Function
SELECT DATEADD(day,2,OrderDate) AS OrderPayDate FROM Orders
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)