web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Retrieve the data in I...
Power Pages
Unanswered

Retrieve the data in IST form using liquid code

(0) ShareShare
ReportReport
Posted on by

I am trying to Retrieve data of date and time column in the power pages. The time that is saved in IST format in Dataverse is not retrieving in the same format, istead getting it in the UTC time.I want show that in the IST 

The following solutions are not working:

{{attendanceresult.basofa_logout | date:"hh:mm:ss" | plus: 19800 }}

{{attendanceresult.basofa_logout | date:"  hh:mm" | date: '+05:30'}}

{{ attendanceresult.basofa_logout | in_time_zone: "IST" | date: "hh:mm" }}

Categories:
I have the same question (0)
  • Suggested answer
    Fubar Profile Picture
    8,346 Super User 2025 Season 2 on at
    Not sure what's going on, I replied to this post and then it disappeared.
     
    I don't believe there is a timezone setting, but you can add days, hours etc to a date field in liquid see the date filters https://learn.microsoft.com/en-us/power-pages/configure/liquid/liquid-filters#date-filters
  • Suggested answer
    Siranga Gamage Profile Picture
    6 on at
    I had the same question a few weeks ago, and from my research, it seems that Liquid doesn't have functionality for that. The only option I found is using the "add hours" filter, if that works for your needs.

    {{ now | date_add_hours: 1 }}
  • Suggested answer
    Inogic Profile Picture
    1,135 Super User 2025 Season 2 on at
    Hi,
     
    We understand that you are looking to retrieve the Created On field in IST format within a Power Pages webpage.
    Currently, Liquid can retrieve the date value, but it cannot directly fetch the formatted value. You can refer to the screenshot below for further clarification.

    However, you can still achieve this by either:
    1. Utilizing Liquid's date functions to adjust the time by adding the required hours for IST.
    2. Leveraging the Power Pages Web API to retrieve the formatted values in IST directly.
    Hope this helps.
     

    Thanks!

    Inogic Professional Services: Power Platform/Dynamics 365 CRM
    An expert technical extension for your techno-functional business needs
    Drop an email at crm@inogic.com 
    Service: https://www.inogic.com/services/ 
    Tips and Tricks: https://www.inogic.com/blog/ 
  • Suggested answer
    abm abm Profile Picture
    32,865 Most Valuable Professional on at
    Hi
     
    You could try using a Jscript
     
    function convertToLocalTime(utcDate, timeZone) {
        // Convert the UTC date to a Date object
        const date = new Date(utcDate);
        // Convert the UTC date to the local time of the specified time zone
        const localDateTime = date.toLocaleString("en-US", {
            timeZone: timeZone,
            year: 'numeric',
            month: '2-digit',
            day: '2-digit',
            hour: '2-digit',
            minute: '2-digit',
            second: '2-digit',
            hour12: false // 24-hour format
        });
        return localDateTime;
    }
     
     
    // Get the current date in UTC format
    const utcDate = new Date().toISOString(); // Today's date in UTC
    const timeZone = "Asia/Kolkata"; // Indian Standard Time (IST) timezone
    const localDateTime = convertToLocalTime(utcDate, timeZone);
    console.log("UTC Date:", utcDate);
    console.log("Local Date Time:", localDateTime);
     
     
    Above replace the utcDate with your date.
     
    Thanks

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 70 Super User 2025 Season 2

#2
Jerry-IN Profile Picture

Jerry-IN 55

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard