You can translate the question and the replies:

Denodo date function conversion

I have a field with data type odf text that returns value in the format : '2021-01-10T07:04:38Z' How can I convert it to locale specific date format so that I can perform date operation on it??
23-11-2023 02:20:14 -0500

1 Answer

Hi, If I want to convert the data type from text to `locale`, then I would follow the below steps: * Open the Virtual DataPort Administration tool and select the required base view. * Navigate to the **Edit** option in the base view. * In the **View Schema** section, there is a field named ‘field type’. * Select the drop down menu and navigate to the field of type ‘localdate’ and select the ‘DATE’ option as the sub data type from the edit option. * Finally, save the changes to the view to change the data type as expected. Also, there is a predefined function [to_localdate]( in Denodo, which helps to convert the data type of a text value containing a datetime in a specific format. For instance, I would make use of the following syntax to convert the data type of the specified field: ``` select TO_LOCALDATE(‘yyyy-MM-dd’ ,<column_name>) from <Database_name>.<view_name>; ``` For further information, please refer to the [Date and Time functions]( document under the Virtual DataPort VQL Guide section. If you still need further assistance and if you are a valid support user, you can raise a [Support Case](, for further assistance from the Support Team. Hope it helps!
Denodo Team
23-11-2023 07:12:00 -0500
You must sign in to add an answer. If you do not have an account, you can register here