JotForm Microsoft Flow - Is it possible for the datepicker to exclude the time?

  • Profile Image
    cemerey
    Asked on August 10, 2017 at 02:05 AM

    Hi Guys,

    I've got a date picker on my form with the Time Field set to OFF.

    Microsoft Flow picks up the time along with the date.

     

     

    Is it possible to exclude the time if the time field is set to off?

     

    Example below:

     

     

  • Profile Image
    nurscukulatt
    Answered on August 10, 2017 at 03:15 AM

    1- You can use “Date Time Single” Widget. First, you can add it from "Widget" Section as it is shown below. 

     

     

    Then from the widget's settings modify it as below. 

    It will be seen as following :

     

    2- Also you can use one additional tool to your example. Add “Time” element from “Basic” section as it is shown below. 

     

    Then modify element's properties as below.

    It will be seen as following :

     

    3 - Another solution is to modif “Date Picker” element which is from “Basic” section.  Edit it's properties as below. 

    It will be seen as following :

    Hope this will work. Please contact us if you need anything else. 

     

     

     

  • Profile Image
    Kiran
    Answered on August 10, 2017 at 04:13 AM

    @cemerey,

    I understand that the date field is also sending the time to Microsoft Flow and you want to send only the date. Could you let us know to which application you are sending the JotForm submission to so that we can test it further? 

    We will wait for your response. Thank you! 

  • Profile Image
    cemerey
    Answered on August 10, 2017 at 04:46 AM

    @Kiran 

    Yes I'm trying to use the DatePicker to send only the date to MS Flow using the Jotform connector. See form and response below:

     

  • Profile Image
    Jim_R
    Answered on August 10, 2017 at 05:55 AM

    Hey @cemerey - I'm afraid MS Flow uses the UTC format (including the time) by default and this is something beyond our control.

    Luckily, after digging around, I found an option in MS Flow where you can use @formatdatetime to change the format of the date field regardless of the source of the trigger (whether it's from JotForm or not).

    I found the following Poweruser threads that are related to your problem:

    https://powerusers.microsoft.com/t5/Building-Flows/Sharepoint-Datetime/m-p/42279#M3843

    https://powerusers.microsoft.com/t5/Connecting-To-Data/formatDateTime/td-p/24013

    And here's a related tutorial I found online:

    http://www.gilleran.net/sharepointireland/index.php/change-date-format-in-microsoft-flow-emails/ 

  • Profile Image
    cemerey
    Answered on August 10, 2017 at 07:01 PM

    I wasn't aware that was an option on MS flow. But I was able to format the date following the links you provided. 

    Thank you

     

    This is what I have in the expression

    formatdatetime(triggerBody()?['04 - Date Picker'],'dd-MM-yyyy')

     

     

    Thanks again

     

  • Profile Image
    Jim_R
    Answered on August 10, 2017 at 07:28 PM

    Awesome stuff! I'm glad that's exactly what you need 😊