Skip to Content
0
Jul 21, 2020 at 03:30 PM

Hana dates format error [6931]

97 Views

Anyone know why this error when I try to format dates?

This is the query of the created view:

Alter VIEW "PRUEBA_SOBERANA"."V_CHEQUES" ( "CheckKey",
	 "CheckNum",
	 "BankCode",
	 "BankName",
	 "CashCheck",
	 "CheckDate",
	 "CardCode",
	 "CardName",
	 "Currency",
	 "CheckSum" ) AS SELECT
	 a."CheckKey",
	 a."CheckNum",
	 a."BankCode",
	 b."BankName",
	 a."CashCheck",
	 TO_VARCHAR(TO_DATE(a."CheckDate", 'YYYYMMDD'), 'YYYY-MM-DD') as "CheckDate", 
	 a."CardCode",
	 a."CardName" ,
	 a."Currency",
	 a."CheckSum" 
FROM OCHH a 
INNER JOIN ODSC b ON a."BankCode" = b."BankCode" 
WHERE a."Deposited" = 'N' WITH READ ONLY

Attachments

captura.png (31.4 kB)