on 04-15-2020 12:57 PM
Hi All,
I am using UTCTOLOCAL to convert UTC time to local time as per the timezone in a calculated column of a calculation view.
Below is the parameters the function support:
UTCTOLOCAL(time, timezone)
However , i wanted to pass the data set to be used as well. I can see that it is supported as per the SQL Reference guide and i am able to execute the same in SQL console as well.
Syntax as per the SQL Reference guide:
LOCALTOUTC (<time> [, <timezone> [, <timezone_dataset>]])
Successfully Executed query by passing the dataset as 'platform'
SELECT UTCTOLOCAL ( CURRENT_UTCTIMESTAMP, 'Africa/Abidjan' , 'platform') "utctolocal" FROM DUMMY;
Any idea why the function provided by expression editor does not support passing the dataset ?
I wanted to perform this in a view itself and not wanted to write a procedure which i guess will support passing of dataset.
Any pointers will be helpful.
Regards,
Tanmay
Unfortunately the dataset parameter is not (yet) released for the usage in the data modelling area. As you mentioned one option is to create a table function which provides the data in the way you need it and use it as data source in a projection (in the table function the dataset parameter can be set of course). Another option would be to create a SQL view which provides you converted timestamp. In an SQL view you can use the UTCTOLOCAL function with the parameter dataset too.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
9 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.