How to calc diff of 2 dates - InfoPath Dev
in

InfoPath Dev

How to calc diff of 2 dates

Last post 05-31-2005 08:29 AM by fillar. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 05-30-2005 05:36 AM

    How to calc diff of 2 dates

    I have a form withe 2 Date Picker!
    I have form's code in c#.
    How to calc the diff between 2 dates?
    (I need the result in years!!!)
  • 05-31-2005 08:29 AM In reply to

    • fillar
    • Not Ranked
    • Joined on 05-31-2005
    • USA
    • Posts 2

    Re: How to calc diff of 2 dates

    I use the following VB code in an InfoPath project to count the difference in weeks.

    TextBox1.Text = "Weeks from today: " & DateDiff("w", date1.Text, date2.Text)

    You should be able to change the "w" to "y". Of course I don't have the InfoPath objects referenced in this example.
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.