Empty date field

Discuss the HanDBase for Windows Desktop program, conduits, and add-ons.

Empty date field

Postby TheFlow » Sat Oct 30, 2010 6:01 am

Hi,

I'm trying to build a database of patients that contain amongst other things several date fields: date of birth, date of 1st consultation, date of x-ray etc.

Several of these fields cannot be filled at the time of record creation, and will be completed at a later date. So I put for default behaviour "date record modified" and when I create a new record, if I did for example a x-ray the date is suggested to today which is fine, if I wanna do it at a later date the field has to stay empty for the time being and the day I take an x-ray I'll modify the record, it will be set as default to date of modification, I'll check the checkbox near the date to "activate" the field and everything is fine. At the time of creation of record I just would like to uncheck the date using the checkbox so that the field remains empty. Unfortunately this isn't working and it keeps displaying the current date.

In other words, it isn't possible to have no value for a date field when the default behaviour of this field is set to "date record added". By chance, I noticed that if the default behaviour is set to "ask user for date", the default date displayed when creating the record is 01.01.1904, and the unchecking function works, so that it actually stores "no date" as a value.

Is this a bug of a normal bahaviour that I misunderstand?

Regards,
Florian
TheFlow
 
Posts: 5
Joined: Wed Oct 27, 2010 5:10 pm

Re: Empty date field

Postby curtterp » Sat Oct 30, 2010 7:32 am

For the Date field, use "Ask user for Date". The date field will show "No Date" until you edit the record and put in a date. Using "Date Record Modified", it will put in the date that you created it (creating is modifying the record).
Have a good day

Curt
I am not a DDHSoftware employee, just a long time HanDBase user.... from Palm to Windows Mobile to Android, to iOS. Thanks to DDH, the database files transferred to each platform without a problem.
curtterp
 
Posts: 679
Joined: Tue May 26, 2009 6:41 pm
Location: Northern IL

Re: Empty date field

Postby dhaupert » Mon Nov 01, 2010 9:51 am

Florian,

There shouldn't be a reason why you can't use Date Record added and be able to set a value to No Date. The 'Date Record Modified' one is one that will be set to the current date when you save a record, but 'Date Record Added' is set ahead of your editing a new record and can then be changed. As Curt said, if it's often going to be No Date, you might as well use the Ask User for Date setting which defaults to that value. It's often the safer way of making sure someone doesn't forget to set something to no date if there isn't yet a date attached.


Since you posted this to the Windows forum I verified on the Windows desktop that this works as I expected/desccribed. Let me know if you're having a problem and if so, what platform you're seeing this problem!
dhaupert
 
Posts: 4111
Joined: Tue May 26, 2009 11:51 am

Re: Empty date field

Postby TheFlow » Thu Nov 04, 2010 2:51 pm

Hello,

Thank you for your replies, and sorry to come back to you that late, I've been having tons of work.

The version I used was indeed the Win version. And apparently I didn't really get the point when creating my DB, since now it's working perfectly with the "ask user for date" setting... Anyway, thanks for your help!

Kind regards,
Florian
TheFlow
 
Posts: 5
Joined: Wed Oct 27, 2010 5:10 pm

Blank Date Field in Access

Postby snoApple » Sun Jan 16, 2011 11:23 pm

This question relates to syncing a HanDBase to Access. In my HanDBase, I have three date fields, all of which can be blank. In Access, they look blank (empty).

In HanDBase, they say NO DATE. This is not a big problem, but I would certainly prefer a blank field to one filled with NO DATE. (It is much easier to spot an empty field than one filled with "NO DATE" instead of a date.)

The big problem is in Access. After a sync with HanDBase, all of my empty date fields now contain "1899-12-30". This is much harder to distinguish than even "NO DATE".

Three questions (two that are significant and one curiosity):

(1) Is there a setting that will prevent HanDBase from converting empty dates to "1899-12-30" and then writing that value back to Access?

(2) If not, any possibility of such a feature in a future edition?

(3) Any reason why I am getting "1899-12-30" instead of "1904-01-01" (the value mentioned in the documentation)?

Bruce
snoApple
 
Posts: 4
Joined: Tue Jan 04, 2011 1:28 pm

Re: Empty date field

Postby dhaupert » Wed Jan 19, 2011 11:55 am

Hi Bruce,

Sorry for the delayed reply. I believe a NO DATE value is sent via ODBC as a value of -1. Since Access accepts dates from 1/1/1900 and up, it would seem that it is subtracting one from this value and coming up with that. I don't believe there is a standardized way to specify No Date in a value for a date field so that's why there is a discrepancy. In our case, there is currently no option to show a blank instead of No Date. That's something you can work around if you are using a platform that supports forms via the conditional hiding and showing of controls.

Hope this info helps!
dhaupert
 
Posts: 4111
Joined: Tue May 26, 2009 11:51 am


Return to HanDBase for Windows

Who is online

Users browsing this forum: No registered users and 1 guest

cron