|
K
|
kleanthis 1/7/2014 |
|
Hi All, i create a report page with fields "CompanyName" and "DeliveryDate" and shows the date that delivery was made for that client. example: Gold Communications 12/20/2013 1/2/2014 1/4/2014 etc, etc now, i nedd to limit the date display to the last 6 months, no more than that. thank you in advance.
select * from tablename where dtstamp>getdate()-180 |
|
|
G
|
gonzalosb author 1/8/2014 |
|
it doesn't work for me, give me an error. |
|
|
|
Sergey Kornilov admin 1/8/2014 |
|
gonzalosb, |
|
|
K
|
kleanthis 1/9/2014 |
|
gonzalosb, you need show us exact query and exact error message. We also need what database do you use. More info you give is better.
|
|
|
G
|
gonzalosb author 1/10/2014 |
|
i'm using MS database |
|
|
|
Sergey Kornilov admin 1/10/2014 |
|
Check your "MS" database documentation in regards to what date functions you can use. Date functions are different for each database. |
|
|
G
|
gonzalosb author 1/15/2014 |
|
ok, done!!! WHERE DeliveryDate>Date()-180
|
|
|
|
lefty 1/16/2014 |
|
ok, done!!! thanks to you 2 (kleanthis and Sergey) i get the solution. WHERE DeliveryDate>Date()-180
|
|