Return to Snippet

Revision: 14150
at May 20, 2009 13:14 by cori


Initial Code
CAST(CONVERT( CHAR(8),GETDATE(),112) AS int)-A.IDAT2 <= @CompletedDateWindow

Initial URL

                                

Initial Description
this little snippet can be used to compare an SAP Date (which might be empty, or '00000000') to today's date, for instance to query for rows that have been closed in the last x days.  Can't CAST the date column (in 'YYYYMMDD' format) to a date for use in where clauses, since '00000000' can't be cast to a datetime

Initial Title
SAP Date Comparison

Initial Tags

                                

Initial Language
SQL