|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Using the GetDate Function
Hi
Having some trouble using the getdate function here is some sample code that i am using for an ASP application: SELECT COUNT(spotnum) AS total FROM spotcheck WHERE year(checkdate) = year(GETDATE()) that will give me a count of all records for this year, how do i get a count for records last year? year(GETDATE(-1))???? sorry im so clueless -Jesse |
|
#3
|
|||
|
|||
|
thank you R937
|
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > Using the GetDate Function |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|