Displaying time correctly - InfoPath Dev
in

InfoPath Dev

Displaying time correctly

Last post 09-23-2016 10:21 AM by The Noob. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 08-07-2009 10:03 AM

    • Mosel
    • Not Ranked
    • Joined on 06-25-2009
    • Posts 12

    Displaying time correctly

    Hello All!

     I have a text box where I would like to display time using the now() function. I have changed the Data type to Time and formated to 9:46:55 AM but its still showing the time as 2009-08-07T09:53:17. How do I remove the date while keeping the time? I have tried every time format available but it still shows as date and time. Thanks!

  • 08-07-2009 10:58 AM In reply to

    Re: Displaying time correctly

    Hi -- now() returns date and time, but you can display just time. First, you'll need to change the data type of the field that will have the default value of now() to Date Time. Then, add your text box or expression box that is bound to that field. Then, in the properties of the control, select the Format button. From there, you'll see 'Display the date like this' and it will default to m/d/yyyy. It is hard to see, but you can scroll that list up just a hair to find the 'Do not display date' selection.

    Hilary Stoupa

  • 08-07-2009 02:21 PM In reply to

    • Mosel
    • Not Ranked
    • Joined on 06-25-2009
    • Posts 12

    Re: Displaying time correctly

    It worked! Thank you so much.

  • 09-23-2016 09:21 AM In reply to

    Re: Displaying time correctly

     Hello Hilary,

    I have a similar display question with this format.  I am containating two date time text box fields using the dateTime data type with now() for the default values. The text box field (Duration) with the concat formula is pulling in the values and displaying the "T" for time. I also like to tweak the format displayed in the Duration field. These dates and times could span across multiple days. I can't seem to find what i'm looking to do and not experienced enough yet to just figure it out, due to being a greenhorn. Any guidence or direction would be greatly appreciated.

     

    Display Example 

    2016-09-23T11:14:342016-09-23T11:14:37 

     Disired Display Example:

    09/23 11:14 AM - 09/23 11:14 AM

     

    Thank you,

    Roy 

  • 09-23-2016 09:34 AM In reply to

    I'd just use some calculated values for this, not a concat formula, where you can't set the format to date. See attached sample. Save the file locally, right click and select Design to open in the designer - from there you can take a look at the design, preview the form, etc.
    Hilary Stoupa

  • 09-23-2016 10:21 AM In reply to

    Re: Displaying time correctly

     You rock Hilary! Thank you very much. I used two calc values and got it displaying how i would like it

Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.