on 2023 Feb 21 9:52 PM
I am using BODS with a HANA HDB data store. For UTC to Local , or local to UTC datetime value conversion, shall I use a generic BODS function, or call a function from the HDB? ALSO I needed to make sure that the DST periods are set correctly, which I hope the function called handles correctly itself?
Thanks!
Greetings lifengwu,
To convert UTC to local time you can either use SAP Data Services utc_to_local() function which you can easily insert in the column mapping.
To use the HANA UTCTOLOCAL() function you would need to use SQL transform or sql() function. This is because unlike SAP Data Services utc_to_local(), HANA's UTCTOLOCAL() function will not work on column mapping.
print(' HANA UTCTOLOCAL Function');
print(' HANA UTCTOLOCAL Function: ' || sql('HANA','SELECT UTCTOLOCAL (TO_TIMESTAMP(\'2012-01-01 01:03:10\', \'YYYY-MM-DD HH24:MI:SS\'), \'EST\') "utctolocal" FROM DUMMY;'));
print(' BODS UTC_TO_LOCAL Function ');
print(' BODS UTC_TO_LOCAL Function: ' || utc_to_local('2012-01-01 01:03:10', 'UTC-5:00') );
Best Regards,
Joseph
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am having some challenge calling the HDB function UTCTOLOCAL from within BODS... BODS simply can't find the function in the datastore.... any tutorial I can go through?
joseph_muiruri
yoganandamuthaiah
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
66 | |
10 | |
10 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.