You can translate the question and the replies:

Date format and Text to Date

Hi, I'm having one column named - EffectiveDate , which has field type as localdate. As denodo, by default shows date format in 'yyyymmdd', i'm using FORMATDATE('MM-dd-yyyy',EffectiveDate) command to change its format. Now, the field got changed into text. But, i need this field in localdate type (i.e) my final result should be in 'MM-dd-yyyy' as localdate type. I used below cast to achive this. But, the column displays only null values. CAST(formatdate('MM-dd-yyyy',EffectiveDate) AS DATE) Can you please help me with this? Thanks in advance!
user
09-12-2020 12:35:32 -0500

1 Answer

Hi, The format of the “date type” in Denodo Platform is [**standardized**](https://community.denodo.com/docs/html/browse/7.0/platform/migration/backward_compatibility/changes_in_the_denodo_platform_7.0/changes_in_virtual_dataport#changes-in-date-types) and will always appear as **yyyy-MM-dd** in the Virtual DataPort Administration Tool. For this scenario, converting **Text** back to **Date** will try to bring the default date format which is yyyy-MM-dd and gives null results. Hence, if I want the 'Date' field to be displayed in a desired datepattern(for eg: 'MM-dd-yyyy') then, I would create a **custom i18n map** using the steps in the [**Managing Internationalization Configurations**](https://community.denodo.com/docs/html/browse/latest/vdp/vql/advanced_characteristics/creating_new_internationalization_configurations/creating_new_internationalization_configurations) section of Virtual DataPort VQL Guide. Hope this helps!
Denodo Team
10-12-2020 07:57:00 -0500
You must sign in to add an answer. If you do not have an account, you can register here