I have an application that holds BirthDates.
Is there a way to query for all birthdates between two dates without
considering the year ?
Like: Between "April 1" and Dec 10". I know who to query between two dates,
but it considers the year.
CASystemsUse
Select *
From <TableName>
Where DateValue Between
Stuff(convert(VarChar(8), DateColumn, 112), 5, 4, '0401') And
Stuff(convert(VarChar(8), DateColumn, 112), 5, 4, '1210')
"CASystems" wrote:
> I have an application that holds BirthDates.
> Is there a way to query for all birthdates between two dates without
> considering the year ?
> Like: Between "April 1" and Dec 10". I know who to query between two dates
,
> but it considers the year.
> --
> CASystemssql
Tuesday, March 27, 2012
Filter by months & days without years
Labels:
application,
birthdates,
database,
dates,
filter,
holds,
microsoft,
mysql,
oracle,
query,
server,
sql,
withoutconsidering
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment