Date Field value not working against criteria until manually changed

Home Forum Behaviors Date Field value not working against criteria until manually changed

This topic contains 4 replies, has 0 voices, and was last updated by  pointreyes 9 years, 2 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #322

    pointreyes
    Participant

    I am using two date fields for holding Beginning and Ending date values for checking against a range. I have another date field that contains the current date (using ‘Now’ in the field settings). I determine the beginning date based on this current date with a behavior. I.e. if the current date is past the 15th then use the first day of the next month. Works great except for the fact that I have to manually change the current date field for the first day in beginning date for this to work. E.g. Today is 10/01/2009, when entering a date to check against this date – all dates past 10/01/2009 are accepted but not 10/01/2009. If I manually edit the current date even by simply deleting the 0 before the 1 (i.e. 10/1/2009) and run the behavior then 10/01/2009 is accepted. I have tried to program the current date to equal the system date but same problem – I must manually change the date before that date is accepted in the criteria.

    Any ideas on this?

    #4808

    ehuezo
    Keymaster

    Hi Pointreyes, sorry, I was lost trying to read what is going on with your form. Would you be able to create a simple form showing your issue and email it to support@perfectforms.com.

    Thanks.

    #4809

    pointreyes
    Participant

    Actually I found the problem but cannot resolve it. When I use the system date or the “now” value in the date input field, the time is also stored in the field. Don’t know why the time is stored in the “Date” input field that is what it appears to be happening. When I manually enter a date, the time is set to 0 hours 0 minutes. Therefore, when checking a date value against the current date this is what happens 10/01/2009 0:0 is < 10/01/2009 <Current Time>. I need to have the current date to have a value of 0:0 for the time in it. How do I do this? Do you need a form to see this behavior?

    #4811

    ehuezo
    Keymaster

    Hi Pointreyes,

    I’m sorry, I’m still not sure what you are talking about to be honest, but there has to be a simpler way. Please take a look at this form as it will show you how to manipulate the date/time objects.

    http://perfectforms.com/Documentation/manual/html/fl_sample_form_using_behaviors.htm

    Thanks

    #4812

    pointreyes
    Participant

    Thanks – issue solved.

    Taking the date value and converting to text in the format of yyyy-mm-dd and then copy that value into a date field removes the time values that are in the date field when using the now value in a date field.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.