Prob Desc :
I am using sql server as my source connection and extracting date from one of a table.
The date format in sql server is "1/18/2006 11:14:37 AM". I have typecasted in the query of the ODBC stage as "convert(varchar(10),INVOICE_DATE, 101) as INVOICEDATE". After type cast,I am getting the date value as 01/18/2006.
I need to filter the records which satisfies the condition.
Code: Select all
ie INVOICEDATE {01/16/2006} >= the system date {current date}
For this I used type cast in the constraint of transformer.
Code: Select all
Code :
OCONV(ICONV(InDate.INVOICE_DATE,"DE"),"D/E") >= OCONV(ICONV(Lookup_Date.Field001,"DE"),"D/E")
If I removed the constraint in the transformer , i am getting all the records from the table.
Can someone correct me if am making wrong here ?
NOTE:
a) 01/16/2006 ---> MM/DD/YYYY
b) OCONV(ICONV ---> Functions used for the conversion of date in internal format of datastage.