Dates in 4D 2004

9 views
Skip to first unread message

Mike Kerner

unread,
Jan 12, 2010, 5:00:13 PM1/12/10
to 4D iNug Technical, 4D Tech GoogleGroups
I'm still using 4D 2004 for lots of legacy reasons, but today I don't seem to be able to use dates at all!

c_date(<>myDate)
<>myDate:=Date("01/01/2009")

evaluates to the null date, as does

<>myDate:=!01/01/2009!

and

<>myDate:=!01/01/09!

and myDate:=Date("01/01/09")


Suggestions?

--
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
  and did a little diving.
And God said, "This is good."

David Dancy

unread,
Jan 12, 2010, 5:04:40 PM1/12/10
to 4d-...@googlegroups.com
Have you got a method anywhere called myDate? Alternatively, check
your system regionalisation settings. They may not be what you expect.

Does it work if you say

C_DATE($myDate)
$myDate:=Add to date(!00/00/00!;2009;1;1)

??

David Dancy
Sydney, Australia

2010/1/13 Mike Kerner <MikeK...@roadrunner.com>:

Mikey

unread,
Jan 12, 2010, 5:25:00 PM1/12/10
to 4d-...@googlegroups.com
Dave & others - my mistake
I can't do a date assignment using the exclamation point delimiter today.  I get a syntax error.  4D doesn't like the !0 on the front.

So even $myDate:=!01/01/09! gives me a syntax error at the !0

I thought this was taking earlier, which is why I posted with the date-delimiter code, but apparently I was mistaken...


So anyway, Dave, no it doesn't work.

Mike Kerner

unread,
Jan 12, 2010, 5:41:48 PM1/12/10
to 4D iNug Technical, 4D Tech GoogleGroups
More followup
I just created a brand new database and in the method editor typed

$someDate:=!01/01/09!

Like in the other structure, the method editor lights !0 in red (error) and the trailing 0! in the process variable color.

This is 2004.7, and Vista SP....2?  3?  Whatever the latest level is.

David Dancy

unread,
Jan 12, 2010, 5:47:43 PM1/12/10
to 4d-...@googlegroups.com
You didn't mention if you'd had a chance to check your regional
settings in the control panels area. I've found that Windows can have
weird settings in there quite unexpectedly. Sometimes changing the
settings (e.g. from English-US to French-France and then back again)
can fix whatever registry settings are broken, and restore correct
behaviour.

Worth a go, at least...

David Dancy
Sydney, Australia

2010/1/13 Mike Kerner <MikeK...@roadrunner.com>:

Reply all
Reply to author
Forward
0 new messages