| Author |
Topic |
|
ismailc
Constraint Violating Yak Guru
290 Posts |
Posted - 2010-04-19 : 16:38:36
|
| Good day, i have an INT column where i want specify addiotnal date range.I manage to get it to work on getdate but not on the column itself - i tried converting but i get "arithmetic overflow"and PHCal.TrxDateNumeric >= convert(varchar,DATEADD(day,-3,Getdate()), 112) but when i try to convert the columnand PHCal.TrxDateNumeric between convert(varchar,DATEADD(day,+1,cast(PHCal.TrxDateNumeric as datetime)), 112) and convert(varchar,DATEADD(day,+3,cast(PHCal.TrxDateNumeric as datetime)), 112)I get the error, pleae help - the datatype is INT |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
ismailc
Constraint Violating Yak Guru
290 Posts |
Posted - 2010-04-19 : 17:20:09
|
| Thanks for helping, my col1 (int)I would like to range 14 days in to the futurewhere col1 between col2 and col1+14 dayswhen i do this it works using Getdate(): col1 between convert(varchar,DATEADD(day,0,Getdate()), 112) and convert(varchar,DATEADD(day,+14,Getdate()), 112) but not if i change the Getdate to the Col1 |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
ismailc
Constraint Violating Yak Guru
290 Posts |
Posted - 2010-04-19 : 17:37:32
|
| 20100418 |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
ismailc
Constraint Violating Yak Guru
290 Posts |
Posted - 2010-04-19 : 18:03:13
|
| yes |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
ismailc
Constraint Violating Yak Guru
290 Posts |
Posted - 2010-04-19 : 18:13:22
|
| yes |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
ismailc
Constraint Violating Yak Guru
290 Posts |
Posted - 2010-04-20 : 03:04:16
|
| Thank You very much, i appreciate your time & kindness. :) |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|