Oracle Analytics Publisher

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

Unable to fetch the right TIMESTAMP as per the user specified Time zone

Received Response
75
Views
11
Comments
User_VICIT
User_VICIT Rank 2 - Community Beginner
edited Nov 13, 2024 3:50PM in Oracle Analytics Publisher

In the BI Report Data Model, we are trying to fetch the User Specified timestamp value but seems like we are not getting it as expected as the $_XDOTIMEZONE is not working as expected.

Can you please help us in finding the actual tag which we can use in the rtf or DM to fetch the user specified timestamp irrespective of the place they are in.

User >> Set Preferences >> Regional >> Time Zone specific

Thanks,
Mansi

«1

Answers

  • MandeepGupta
    MandeepGupta Rank 8 - Analytics Strategist

    Hi @User_VICIT ,

    Can you please elaborate a bit more? Are you trying to convert some date time from a backend table to a time in a timezone specified at "User >> Set Preferences >> Regional >> Time Zone specific" ?

    Thanks.

  • User_VICIT
    User_VICIT Rank 2 - Community Beginner

    Yes, I am trying to fetch the user specific time from the specified timezone either SQL or any tags which I can use at the RTF level helps, as I have tried every approach but it is not working as expected.

    Thanks

  • MandeepGupta
    MandeepGupta Rank 8 - Analytics Strategist

    Hi @User_VICIT,

    If you have the SQL ready to get user's preferred timezone, then you can use below function Data model and try:

    CAST(wlif.start_date AT TIME ZONE wlaf.time_zone AS DATE) actual_date_time

    where wlaf.time_zone —> timezone from user preferences.

    Thanks.

  • User_VICIT
    User_VICIT Rank 2 - Community Beginner

    Hello Mandeep,

    Usually the tag with XDO will be giving the timestamp details directly, I am only missing on only this one. Is it possible via any logics instead of putting the value as right now for the Time Zone I am getting EST & EDT and it is not coming as expected on the Timestamp though I need to hardcode. Any workaround on this?

    Thanks.

  • MandeepGupta
    MandeepGupta Rank 8 - Analytics Strategist

    I agree @User_VICIT. XDOTIMEZONE should work as well. But what I shared was a workaround from SQL side.

    Can you share the syntax you are using in your template?

    Thanks.

  • User_VICIT
    User_VICIT Rank 2 - Community Beginner

    Hey @MandeepGupta,

    I am using below tags,

    <?xdoxslt:current_date($_XDOLOCALE, $_XDOTIMEZONE)?>

    <?xdoxslt:current_time($_XDOLOCALE, $_XDOTIMEZONE)?>

    Thanks.

  • MandeepGupta
    MandeepGupta Rank 8 - Analytics Strategist

    Hi @User_VICIT

    Can you try below format in your template?

    <?xdoxslt:current_time('ja-JP', 'Asia/Tokyo')?>

    Thanks.

  • User_VICIT
    User_VICIT Rank 2 - Community Beginner

    Hey @MandeepGupta,

    I have checked on it and yes I am able to format the template with the "<?xdoxslt:current_time('ja-JP',

     'Asia/Tokyo')?>" and I am able to get the time at "0:32:20" as of now.

    Thanks.

  • User_VICIT
    User_VICIT Rank 2 - Community Beginner

    Can you give the EST format of the same current time.