DATE Problem with 7.1 version

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
arkagwa
Posts: 119
Joined: November 18th, 2014, 5:25 am

DATE Problem with 7.1 version

Post by arkagwa »

Dear Josh and ALL

i have observation on date variable since beta version

I have variable date in the dictionary and i have set it in the form (Field properties) as date in format DDMMYYYY. My valid range is 01012018 to 02032018 and Not declared as =11111111. This varible has to be entered by clicking date panel. I am trying to enter 10012018 and CSPro returns error" out range , enter a valid date" this is wrong error. But when i change date format to YYYYMMDD and i change the range of dates in this format (YYYYMMDD) it works.
This looks like dates are validated only in format YYYYMMDD even if no code to change it, when already declared as date in new CSPro7.1. Moreover date=systemdate("DDMMYYYY") works fine
Screenshot 2018-03-22 10.40.042.png
Screenshot 2018-03-22 10.40.042.png (24.75 KiB) Viewed 3849 times
Screenshot 2018-03-22 10.40.042.png
Screenshot 2018-03-22 10.40.042.png (24.75 KiB) Viewed 3849 times
Screenshot 2018-03-22 10.40.042.png
Screenshot 2018-03-22 10.40.042.png (24.75 KiB) Viewed 3849 times
Attachments
Screenshot 2018-03-22 10.37.13.png
Screenshot 2018-03-22 10.37.13.png (23.5 KiB) Viewed 3849 times
Screenshot 2018-03-22 10.40.04.png
Screenshot 2018-03-22 10.40.04.png (8.85 KiB) Viewed 3849 times
aaronw
Posts: 561
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: DATE Problem with 7.1 version

Post by aaronw »

The date you've selected is larger than any date in your range. Look at the two most significant digits. 10-01-2018 is greater than any number in your range 01-01-2018 to 02-03-2018.

For this reason I think it makes sense to work with dates in the format YYYYMMDD. Otherwise, days (the smallest granularity of time in your date) are your most significant digits.
segxy4manu
Posts: 37
Joined: August 31st, 2016, 5:51 pm

Re: DATE Problem with 7.1 version

Post by segxy4manu »

Am not sure you need value set in this case as you've declared it already in form (field properties) as "DDMMYYYY" just remove the value set and try again or you use syntax to pick system date
Mariovaisman
Posts: 133
Joined: February 11th, 2013, 8:26 am

Re: DATE Problem with 7.1 version

Post by Mariovaisman »

Hello,

I didn't check your app, however, when you have to define a valid range of dates, you need to collect the data in YYYYMMDD format, because the variable is numeric, and Jan 31 2018 is bigger than Jan 1 2019.

Thanks

Mario
Post Reply