Date format using Table Format script

Hi,

I am using Helical Insight 4.0. The table format script has the customization for date format as well. It does not seem to be working. Is there a particular syntax I need to use?

Thank You

1 Like

Hello kevin,

The customization script is a JS code. Hence, the format to be used should use the symbols and notations used by javascript.

For a datetime value that is in the format “2014-10-10 00:50:09.0” , you can refer to it as

%Y-%m-%d %H:%M:%S.0

If you want to change the format to DD/MM/YYYY HH:MM:SS (for eg: 10/10/2014 00:50:09) then you will mention the resultant or converted format as %d/%m/%Y %H:%M:%S.0

image

image

Please note that the script can be used to convert datetime to datetime and date to date. You cannot convert from datetime to date using this script.

In order to convert from datetime to date, you will need to use the database functions that are available at the column level.

Thank You
From Team Helical