DateTime Example

DECLARE @Mth smallint
SET
@Mth = 11
SELECT DateName(mm,DATEADD(mm,@Mth,-1)) as [MonthName]

SELECT Number + 1 as [MonthNumber],
DateName(mm,DATEADD(mm,Number,0)) as [MonthName]
FROM master..spt_values
WHERE Type = 'P' and Number < 12

Comments

Popular posts from this blog

IBM FileNet: Bulk Processing using JavaScript

DB2 Date Time Functions

File Net Insert Document