@Parameter int,
@ParameterDateName DateTime,
@ParameterDateName DateTime
SELECT FieldName,FieldName,DATEDIFF(day, FieldDateName, GETDATE()) as abc,FieldName from TableName where DATEDIFF(day, FieldDateName, GETDATE()) > @Parameter
and
FieldDateName>= convert(datetime, @ParameterDateName, 20)
and FieldDateName <= convert(datetime, @ParameterDateName, 20)
ORDER BY Fieldname desc
@ParameterDateName DateTime,
@ParameterDateName DateTime
SELECT FieldName,FieldName,DATEDIFF(day, FieldDateName, GETDATE()) as abc,FieldName from TableName where DATEDIFF(day, FieldDateName, GETDATE()) > @Parameter
and
FieldDateName>= convert(datetime, @ParameterDateName, 20)
and FieldDateName <= convert(datetime, @ParameterDateName, 20)
ORDER BY Fieldname desc
No comments:
Post a Comment