realbasic-nug
[Top] [All Lists]

Re: Date trouble

To: REALbasic Network Users Group <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Date trouble
From: Tracy <tracy at ak dot planet dot gen dot nz>
Date: Tue, 11 Dec 2001 04:54:59 +1300
Hi Norman
Very weird about the date thing not working - but alas
taking small steps backwards I traced it back.
I firstly checked the other windows to make sure they still worked.
Then checked the code - it was the same (structure wise)
So then went back to the database of the windows that worked
and found the date fields weren't "date" but were "varchar"
so thats why they worked. Always there is a reason - although
its not always obvious at the time.

Thanks for the case senstive pointer - I'll implement that as I'm
just working on all the search parts of my app.

Thanks for your help (yet again)

Cheers Tracy


At 07:47 10/12/2001 -0700, you wrote:
the DATABASE dates are always YYYY-MM-DD regardless of your system setting

And yes the DB is case sensitive unlike the rest of the language
If you need case insensitive searches do

   select * from table where upper(keyfield) = upper(search criteria)


On Sunday, December 9, 2001, at 11:18  PM, Tracy wrote:

Hi Norman
The date format under my settings is dd/mm/yyyy
would it still read as yyyy/mm/dd ??


I also sent another message before this one but haven't seen it come up yet
So while your'e there - I'll throw it your way.

Is the REAL db case sensitive when it comes to retreiving / searching
or is it the REAL db API ??
I'm suspecting the REAL db API

Cheers Tracy




At 23:07 09/12/2001 -0700, you wrote:
They are always formatted as YEAR-MON-DAY (2001-12-25)

But a nil object exception is usually related to referencing something that is either nonexistent or has been nilled.


On Sunday, December 9, 2001, at 10:56  PM, Tracy wrote:

Hi Listers
Another little issue

I'm trying to save a date in a date field of a REAL db.
The date appears on screen as 03/12/2001   (3rd Dec 2001)

but won't save as a date format in a field called date in a RB db.

I know the code that saves it perfectly OK as I use it on 6 other windows.

I've tried changing the name of the field in RB db in case there was some
kind of silly clash with the word date. But to no avail.
When I try to save - I get a nil object exception.
So i comment out the line that saves this particular field and theres no error.
Checked and double checked the spelling etc.

Do dates need to be treated differently ???

Thanks Tracy


---
Subscribe to the digest: <mailto:realbasic-nug-> digest at lists dot realsoftware dot com>
Unsubscribe:
<mailto:realbasic-nug-off at lists dot realsoftware dot com>


---
Subscribe to the digest: <mailto:realbasic-nug->> digest at lists dot realsoftware dot com>
Unsubscribe:
<mailto:realbasic-nug-off at lists dot realsoftware dot com>


---
Subscribe to the digest: <mailto:realbasic-nug-> digest at lists dot realsoftware dot com>
Unsubscribe:
<mailto:realbasic-nug-off at lists dot realsoftware dot com>


---
Subscribe to the digest: <mailto:realbasic-nug-digest at lists dot realsoftware 
dot com>
Unsubscribe:
<mailto:realbasic-nug-off at lists dot realsoftware dot com>



<Prev in Thread] Current Thread [Next in Thread>