Problem with %MV.Date data type?

0 views
Skip to first unread message

david at healthpac

unread,
Jun 29, 2008, 4:20:54 PM6/29/08
to InterSystems: MV Community
Has anyone run into a problem where %MV.Date data type properties can
not be negative? If at the MV terminal prompt you do:

;CRT “%MV.Date”->IsValid(-12345)

It returns an error response. If you try to execute a %Save() and
there is an %MV.Date property and the date is a negative, the save
fails. I know %Date can not be negative, but %MV.Date negative dates
should definitely be accepted. Am I missing something here?

Running 2008.02 build 405..

-Dave

Ed Clark

unread,
Jun 29, 2008, 4:49:09 PM6/29/08
to InterSy...@googlegroups.com
You're not missing anything.. Looks like a bug to be fixed.

david at healthpac

unread,
Jun 29, 2008, 5:14:19 PM6/29/08
to InterSystems: MV Community
Well at least I know I'm not going crazy :). Would you like to run
with this, or should I submit it to WRC?

-Dave

Ed Clark

unread,
Jun 29, 2008, 5:35:16 PM6/29/08
to InterSy...@googlegroups.com
I've passed it to development.

Dawn Wolthuis

unread,
Jun 29, 2008, 6:51:18 PM6/29/08
to InterSy...@googlegroups.com
Yes, I ran into this recently. I tried putting my birthdate into a
Zen control a few weeks ago and got the run-tine error message (that I
just duplicated) of

Datatype value -4286 less than MINVAL allowed of 0

(and, yes, I know your birthdate is a positive number, Dave ;-)

At the time I thought -- "better figure this out 'cause I must be
doing something wrong as surely others have collected birthdates
before and I'm not the only person with a negative PICK birthdate."

All of the dates we have in our code today would be more recent dates,
so I didn't jump to debug this, but we will be collecting birth dates
at some point and clearly need to be able to accomodate people with
negative MV birthdates.

Did this just crop up with 2008.2 or is this in releases that are in
general distribution? --dawn
P.S. I just noticed Ed's speedy reply. Good deal.

--
Dawn M. Wolthuis

Take and give some delight today

david at healthpac

unread,
Jun 30, 2008, 12:00:50 AM6/30/08
to InterSystems: MV Community
I only ran into it because I was testing, and in general I'm working
with an MV database that already exists and had no reason to change an
existing individual's birthdate, and that validation does not fire for
existing data, it only fires if the data value changes (so existing
accounts with birthdates that were negatives were re-saved without a
problem as long as the birthdate didn't change). It wasn't until I
tried making a new person with a negative birthdate to test something
else that suddenly the error appeared. Not sure if it exists in
pre-2008.2..

I really continue to be amazed at how great IS is with these things.
It really has been great working with people like Lee, Ed, Greg, Ben,
and all the others (too many to name, sorry). Seriously, 29 minutes
on a sunday evening to respond to something on a forum and immediately
submit it for review/correction to the correct powers that fix these
things? I've never seen that, let alone from an international
company. Thank you guys, because you make our jobs so much more
pleasant.

-Dave

On Jun 29, 6:51 pm, "Dawn Wolthuis" <dawnwolth...@gmail.com> wrote:
> Yes, I ran into this recently.  I tried putting my birthdate into a
> Zen control a few weeks ago and got the run-tine error message (that I
> just duplicated) of
>
> Datatype value -4286 less than MINVAL allowed of 0
>
> (and, yes, I know your birthdate is a positive number, Dave ;-)
>
> At the time I thought -- "better figure this out 'cause I must be
> doing something wrong as surely others have collected birthdates
> before and I'm not the only person with a negative PICK birthdate."
>
> All of the dates we have in our code today would be more recent dates,
> so I didn't jump to debug this, but we will be collecting birth dates
> at some point and clearly need to be able to accomodate people with
> negative MV birthdates.
>
> Did this just crop up with 2008.2 or is this in releases that are in
> general distribution?  --dawn
> P.S.  I just noticed Ed's speedy reply.  Good deal.
>
Reply all
Reply to author
Forward
0 new messages