1 Reply Latest reply on Jul 19, 2016 3:01 PM by Sajid Patel RSS
    nadams Explorer

    Datepicker without time causes previous day to be submitted to the script

    The issue I believe is due to the browser time zone being BST. The browser is returning the UTC datetime for the selected date with 00:00:00 for the time element. this causes it to move back an hour to the previous day.

     

    Is there anyway to specify the time used witout it displaying? for instance if I set the time to 13:00:00 then the correct day would always be returned and all I need to do it normalise(set the start time to 00:00:00 and end time to 23:59;59) my times to use it in a query.

     

    or is there a way to get the date that the user selected regardless of the timezone in use?

      • Re: Datepicker without time causes previous day to be submitted to the script
        Sajid Patel Apprentice

        One way to achieve it would be to configure your Date-Time-Picker to be 'DateOnly'. Bind your start and end dates in the query using expressions to add the time portion as per the needs.

        OR

        if you want to query data for a particular date ignoring the time portion, no expression may be needed. For e.g. for all data from 2016-July-18 you can use DateOnly and pick the following dates:

             Start Date - 2016-July-18 00:00:00 & End Date - 2016-July-19 00:00:00