Subtacting a day from today() - InfoPath Dev
in

InfoPath Dev

Subtacting a day from today()

Last post 09-19-2009 06:39 PM by Michael71. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 09-19-2009 07:59 AM

    • Michael71
    • Top 50 Contributor
      Male
    • Joined on 10-07-2006
    • Mclean, Virginia-USA
    • Posts 283

    Subtacting a day from today()

    I've tried to subtract 1 day from today in XPath, but haven't gotten it to work. I used today() - 1, but this certainly did not work. I just want to subtract 1 day from today in a XPath function.

  • 09-19-2009 09:48 AM In reply to

    Re: Subtacting a day from today()

     In InfoPath 2007, addDays(today(), -1) should work.

    In InfoPath 2003 you will most likely need to use code.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 09-19-2009 11:28 AM In reply to

    • Michael71
    • Top 50 Contributor
      Male
    • Joined on 10-07-2006
    • Mclean, Virginia-USA
    • Posts 283

    Re: Subtacting a day from today()

     

    Will I need to use C# or VB code and if so will this have to be a Administrator approved form on to the SharePoint 2007 portal.
  • 09-19-2009 02:12 PM In reply to

    Re: Subtacting a day from today()

    No code needed. There's a function called addDays which lets you add a -1. Create a rule that sets a value when the first date is inputted. For the value, select the Fx and insert the addDays function with the correct parameters (date node and -1). Easy money.

    Patrick Halstead
    Project Manager at Qdabra
  • 09-19-2009 06:39 PM In reply to

    • Michael71
    • Top 50 Contributor
      Male
    • Joined on 10-07-2006
    • Mclean, Virginia-USA
    • Posts 283

    Re: Subtacting a day from today()

     

    I'm using Infopath 2003. All I want to do is set @reportdate = today()-1 

    AddDays is not avaible in InfoPath 2003. Can you point me to the right direction on the code nto add or post the code to do this. I only need the today()-1 part. Thanks.

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