How do I get the “Time” to stop displaying on notification emails sent through a SharePoint workflow? - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

How do I get the “Time” to stop displaying on notification emails sent through a SharePoint workflow?

Last post 06-17-2010 11:48 PM by Nitin. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 05-06-2010 05:40 AM

    How do I get the “Time” to stop displaying on notification emails sent through a SharePoint workflow?

     I have a field in an InfoPath form with the Data Type set to “Date (date)”.  Once the form is submitted to a SharePoint Form Library, a workflow I created for that library sends out email notifications for approval.  In that email, I have it set to display the date entered in that particular date field – HOWEVER, in the email the date displays along with a TIME that is ALWAYS displayed like this: 12:00:00 AM.
     
    How do I make that time disappear from the automated emails while displaying ONLY the date?

    Bruce Burns
    Sr. SharePoint Developer
  • 05-06-2010 08:16 AM In reply to

    Re: How do I get the “Time” to stop displaying on notification emails sent through a SharePoint workflow?

    How have you formatted that date filed in InfoPath?  I assume that the field is promoted from the form to SharePoint and your workflow email uses that field in the email, is that right?

    Is the field being promoted to SharePoint the way you want it?  But then not working right in the SharePoint generated email?

    Ted

  • 05-06-2010 08:24 AM In reply to

    Re: How do I get the “Time” to stop displaying on notification emails sent through a SharePoint workflow?

    Exactly - only thew date is displaying in the form's library column like so: 5/6/2010.  However, when it uses the same in the email, it's adding the time for some reason.  Do you know how to fix that?

    Bruce Burns
    Sr. SharePoint Developer
  • 05-06-2010 09:04 AM In reply to

    Re: How do I get the “Time” to stop displaying on notification emails sent through a SharePoint workflow?

    Yeah, you need to workaround this in InfoPath by creating a hidden field. InfoPath is promoting it a certain way despite what you have for showing the field in the form.  I found this article:

    http://www.eggheadcafe.com/software/aspnet/32876397/sharepoint-timestamp-issu.aspx

    And if you go to the bottom post you will see your problem and how somone solved it.

    I had this same problem but figured out a work around.
    
    First I created a new hidden text field in Infopath called DatetoString and
    set the value to a concat formula to re-format the date the way I wanted. I
    could then use this new field when working with workflows in SharePoint.
    
    concat(substring(StartDate, 6, 2), "/", substring(StartDate, 9, 2), "/",
    substring(StartDate, 0, 5))
  • 05-07-2010 06:32 AM In reply to

    Re: How do I get the “Time” to stop displaying on notification emails sent through a SharePoint workflow?

    Ok, I've tried for hours getting the formula I need and I just don't have the formulating experience or understanding to create what I need, which is adding 14 days to the current date while getting the date to display in SharePoint workflow emails without the time added.

    Here is what I created, another field with the concat and substrings, but it's not working right in adding the days: concat(substring(today(), 6, 2), "/", substring(today(), 9, 2), "/", substring(today(), 0, 5), addDays(., 14))

    Any suggestions?

    Bruce Burns
    Sr. SharePoint Developer
  • 06-17-2010 11:14 PM In reply to

    • Nitin
    • Not Ranked
    • Joined on 06-17-2010
    • Posts 2

    Re: How do I get the “Time” to stop displaying on notification emails sent through a SharePoint workflow?

    Thanks to both of you. However, I am using INFOPATH 2003 and do not have "substr", "addDays" functions.

     Any work around for me?

  • 06-17-2010 11:48 PM In reply to

    • Nitin
    • Not Ranked
    • Joined on 06-17-2010
    • Posts 2

    Re: How do I get the “Time” to stop displaying on notification emails sent through a SharePoint workflow?

    I am done on that. There is function called substring instead of substr.

     Now, I need only addDays function's functionality in 2003.

     If someone can help.

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