Compare today's date to a specific date - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Compare today's date to a specific date

Last post 11-20-2020 10:27 AM by ipisors. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 11-19-2020 01:45 PM

    Compare today's date to a specific date

    How can I test in an expression if today is after december 4th, 2020? I couldn't find this from googling! sorry! and thank you for looking at my question.
  • 11-19-2020 03:47 PM In reply to

    Re: Compare today's date to a specific date

    Oh, I'd probably use a translate formula and just turn the date into numbers: translate(today(), "-", "") > 20201204
    Hilary Stoupa

  • 11-20-2020 07:09 AM In reply to

    Re: Compare today's date to a specific date

    Ok, and does today() include the Time component? If so, does that mean I should make it translate(today(), "-", "") > 20201205 (since even 12/5/2020 12:01 AM will be greater) and I want it to "pass" the test as soon as it's 12/05 ? This did not work upon Publish time, it then said error
  • 11-20-2020 07:26 AM In reply to

    Re: Compare today's date to a specific date

    See above screenshot, did not work when Publish it, at that moment it gave error.
  • 11-20-2020 08:14 AM In reply to

    Re: Compare today's date to a specific date

    The today function just returns the date. You can test these things with calculated values. The syntax will be different for a condition - I didn't know that's what you were doing, and thought you'd be pasting this into the function editor for a rule. For a condition, change the first dropdown to "the expression" and use: translate(xdDate:Today(), "-", "") > 20201205
    Hilary Stoupa

  • 11-20-2020 10:27 AM In reply to

    Re: Compare today's date to a specific date

    Ahh, ok thank you !! that worked great!
Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.