You can translate the question and the replies:

Date format used in the fixed WHERE Clause of Derived queries

I want to add a WHERE condition to a derived query and the field in the clause is a Date field. What is the formet I need to use in the condition value? In the Derived View > Edit > Where Conditions > add a condition field name = 'InceptionDate' operator = 'greater than' (>) value = ? (the value needs to be January 1 2001) When I execute the Derived View in the Execution Panel I get the value for the 'InceptionDate' in the format of: Sat Jan 01 00:00:00 EST 1
user
12-07-2017 09:56:27 -0400
code

1 Answer

Hi In Virtual DataPort, you can use the TO_DATE function to convert the text value "January 1 2001" to date value. The TO_DATE function converts a text containing a date value in a specific format, into a value of type date. You could find its syntax below, ``` to_date (<date format>,<date value >). ``` For instance, you could use the below query to filter the results, ``` Select * From View where field1 > to_date('MMMM, dd yyyy','January, 01 2001') ``` You could also refer this [section](https://community.denodo.com/docs/html/browse/6.0/vdp/vql/appendix/syntax_of_condition_functions/date_processing_functions#to-date) for more details on TO_DATE function. Hope this helps!
Denodo Team
13-07-2017 09:22:00 -0400
code
You must sign in to add an answer. If you do not have an account, you can register here