simple date comparison yet it does not work ! - InfoPath Dev
in

InfoPath Dev

simple date comparison yet it does not work !

Last post 12-25-2012 02:53 AM by Jimmy. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 12-23-2012 10:33 PM

    simple date comparison yet it does not work !

    hi

    I have a field that I want to disable based on today's date but i just cannot get it to work

    so For example  I have a  hidden field called "CutOffDate"   with a value of 31/01/2013  and if the cut off date is less than today's date then disable field X .. my rules is as follow  ( In human language , I want to give my users all the way to Jan 31 to enter value in field X , on Feb 1, field x will be disabled

    If  CutOffDate > today()   disable

  • 12-24-2012 07:21 AM In reply to

    Re: simple date comparison yet it does not work !

    The first thing you described is the opposite of the second thing you described. Logically, I think the second description is probably the right one, and in that case, it would be

    If CuttOffDate < today() disable

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 12-25-2012 12:13 AM In reply to

    Re: simple date comparison yet it does not work !

    Thanks Jiimmy this work

    But for hiding a field, it seems the opposite is true .    So same case and I want to hide a field (section) if CutOffDate has not reached

     if CutOffDate > today () hide?

    I am abit confused with the greater than and lower than operator in Infopath .     Lets compare December 2012 and Jan 2013 .. which date is older?

    Does December 2012 > January 2013 = true ?   or is it opposite ?

  • 12-25-2012 02:53 AM In reply to

    Re: simple date comparison yet it does not work !

    amedjones:
    But for hiding a field, it seems the opposite is true .    So same case and I want to hide a field (section) if CutOffDate has not reached

     if CutOffDate > today () hide?

     Yes, this is correct.  Later dates are greater than earlier dates, so January 2013 > December 2012 = true.

    If you think of it as 2013-01 > 2012-12, then I think it makes perfect sense.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.