Time not display at textbox control - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Time not display at textbox control

Last post 05-25-2009 06:21 PM by cywan. 10 replies.
Page 1 of 1 (11 items)
Sort Posts: Previous Next
  • 05-08-2009 02:14 AM

    • cywan
    • Top 500 Contributor
    • Joined on 04-27-2009
    • Posts 32

    Time not display at textbox control

    Hi,

    I have created a column with two controls which is Date and Time. Please refer to attachment. [datetime.png]

    In the DateTime field, the first textbox which is used to show date, it is successfully display the date. However, for the second textbox control which is used to show time, i have done the time format settings and it still now shown after the form publish to Sharepoint2007.

    Here is the setting i have done :

    Under the General Tab > I have choose Format as : Time > Click on Format button > i have choose the time format and locale that i want.

    After this formatting, the time still does not display until i notice there is a message on top during when i choose the time format and locale. The error message is "Some Time format are not available" and click on it then it shown "Server forms are not support some format. These format are not available."

    It seems each of the time format and locale i change and choose, the error message still display on top of it.

    Can anyone tell me why?

     Thanks & Regards cywan


  • 05-08-2009 04:06 AM In reply to

    Re: Time not display at textbox control

    Hi cywan,

    I just tried out some code and it works here.

    What I did was the following:

    [1] Create 2 textboxes.
    [2] Go to DataSource and change the type of the first field to "Date" and the second to "Time".
    [3] Select the date textbox and on the Menu go to Format > Data Formating...
    [4] Click the "Display the date like this" radio button and select a format and locale.
    [5] Repeat steps [2] to [4] for the time textbox.
    [6] Publish the form and it works.

    - Samir -

     

  • 05-10-2009 06:12 PM In reply to

    • cywan
    • Top 500 Contributor
    • Joined on 04-27-2009
    • Posts 32

    Re: Time not display at textbox control

    Hi Samir,

    I have tried it before the date and time settings as what you have tried out as at above. Thats is why i still cant get the time to display.

    This is the time format and locale that i have choose:   

    Format : Time

    Display the time like this : 09:46:55      Locale : Malay(Malaysia)

     

    May i know where to check the locale whether installed in Sharepoint? May i know under which folder/path in Sharepoint?

     

    Thanks.

     

     

  • 05-11-2009 12:25 AM In reply to

    Re: Time not display at textbox control

    Does your choice of time format work when viewed in the preview of the InfoPath client?

  • 05-11-2009 12:57 AM In reply to

    • cywan
    • Top 500 Contributor
    • Joined on 04-27-2009
    • Posts 32

    Re: Time not display at textbox control

    Hi, 

    When i do preview on the form, the date and time will not be display on the form.

    But when i deploy to SharePoint, the date will display but the time will not be display.

    Thanks & Regards Cywan

  • 05-12-2009 12:40 AM In reply to

    Re: Time not display at textbox control

    Which functions are you using to get the time and date?

    - Samir -

  • 05-14-2009 11:55 PM In reply to

    • cywan
    • Top 500 Contributor
    • Joined on 04-27-2009
    • Posts 32

    Re: Time not display at textbox control

    Hi, This is how i create to get the time : [1] At data source, i have created one field named 'submittedTime' with the datatype which is Time (time) [2] Then in the form, i have created a Time field using expression box control. In the expression box properties, under the General tab, i have choose Data Source and at the edit formula, i have click on 'Insert Field or Group' and selected the 'submittedTime' from the data source. I have select 'Time' as 'Format as' and click on 'Format' button, i have choose 'Display Time Like this : 09:46:55' and 'Locale : Malaysia' [3] Lastly, i save the form and publish the form in SharePoint. This is how i set the time without choosing any function. Am i doing the correct way as describe at above? Please advice. Thanks & Regards cywan
  • 05-25-2009 01:28 AM In reply to

    Re: Time not display at textbox control

    Sure, this is a good way of doing it, but you still need to populate the submittedTime field in order to see a time in the expression box.

  • 05-25-2009 02:40 AM In reply to

    • cywan
    • Top 500 Contributor
    • Joined on 04-27-2009
    • Posts 32

    Re: Time not display at textbox control

    Hi,

    May i now how to populate the submmitedTime field?

    Thanks & Regards CYWAN 

  • 05-25-2009 04:25 AM In reply to

    Re: Time not display at textbox control

    Hi cywan,

    You have to change the Data type of the submittedTime field to be Date and Time instead of Time.

    [1] Go to the DataSource, right click on the submittedTime field.
    [2] Set the Data type of the field to "Date and Time (dateTime)"
    [3] Click on the function button next to the Default Value and insert the following function: now()
    [4] Press OK to finish.

    If you go to preview now, you will hopefully see the time in the expression box.

    In the attached InfoPath form, you can find an implementation of the functionality.

    Hope it helps.

  • 05-25-2009 06:21 PM In reply to

    • cywan
    • Top 500 Contributor
    • Joined on 04-27-2009
    • Posts 32

    Re: Time not display at textbox control

    Hi Samir,

    I have tried it out and its work. Now it show when i preview and publish in the Sharepoint.

    Many thanks for your advice and help. Many many THANKS!

    Regards CYWAN 

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