Issue with creating Date field in virtual table
26 August, 2014
I am including the following as a field in the select portion a virtual table (returns the first day of last month), and it keeps returning a varchar rather than a date which then means I can't link to other tables that use date.
CONVERT(DATE, DATEADD(dd,-(DAY((DATEADD(month, -1, GETDATE())))-1),(DATEADD(month, -1, GETDATE()))))
I have also tried:
CAST(DATEADD(dd,-(DAY((DATEADD(month, -1, GETDATE())))-1),(DATEADD(month, -1, GETDATE()))) AS DATE)
Thanks,
Clinton
CONVERT(DATE, DATEADD(dd,-(DAY((DATEADD(month, -1, GETDATE())))-1),(DATEADD(month, -1, GETDATE()))))
I have also tried:
CAST(DATEADD(dd,-(DAY((DATEADD(month, -1, GETDATE())))-1),(DATEADD(month, -1, GETDATE()))) AS DATE)
Thanks,
Clinton
Hi Clinton,
unfortunately, the jTDS JDBC driver shipped with Yellowfin doesn't support the DATE data type for Microsoft SQL Server. Please refer to this webpage for the list of supported data types.
Kind Regards,
Artem
unfortunately, the jTDS JDBC driver shipped with Yellowfin doesn't support the DATE data type for Microsoft SQL Server. Please refer to this webpage for the list of supported data types.
Kind Regards,
Artem