Date/time type

  • Thread starter Thread starter Jacco
  • Start date Start date
J

Jacco

Hi,

I am wondering if it is possible in a date variable
(date/time type, short date, 09-09-0000) to enter an
incomplete date ? For example, if the day-part is missing,
but month and year are known. Or maybe I could give day
the value 99 in case of unknown ?

Who can help me out ?
Maybe it is not possible, and the only alternative is to
make seperate variables month and year.... *sigh*
 
Access Date/Time data types store ... date/time values. A date missing a
day, month, or year isn't a date.

But if you describe what you are trying to accomplish, there may be another
way...

(by the way, if you enter a date, but display only the Month & Year, does
that solve what you are trying to do?)
 
Thanks, but no. Data entrists need to enter data they get
on paper, and for some dates the day-part can be missing
(for example: patients are asked when they started
smoking, but if they already do this for al long time,
they might not know the start date completely, but e.g.
only month and year).

Who else can help me ?
 
Hi,

I am wondering if it is possible in a date variable
(date/time type, short date, 09-09-0000) to enter an
incomplete date ? For example, if the day-part is missing,
but month and year are known.

No, it is not possible. A Date/Time field - regardless of how it is
displayed - is stored as a Double Float number, a count of days and
fractions of a day (times) since midnight, December 30, 1899. As such,
any date/time value corresponds to a single precise instant (well,
precise within a few microseconds) of time. 09-??-2000 is not a
precise instant of time and cannot be translated into such a double
float number.
Or maybe I could give day
the value 99 in case of unknown ?

Who can help me out ?
Maybe it is not possible, and the only alternative is to
make seperate variables month and year.... *sigh*

That, or a Text field with some VBA code to parse it. Ambiguous dates
are difficult - how do you determine durations if you don't know (say)
the year, using ANY technique?


John W. Vinson[MVP]
(no longer chatting for now)
 
Since, in your own words, accurate dates may not be known anymore because the
event occured many years ago, there is no mathematical function anywhere that
could gice you a more accurate estimation. Why don't you just settle for the
first or last (or any other) day of a month (if that is known) or any month
within a year to, at least, have a valid date in your data base.
 
Thanks a lot both !

Jacco
-----Original Message-----
Since, in your own words, accurate dates may not be known anymore because the
event occured many years ago, there is no mathematical function anywhere that
could gice you a more accurate estimation. Why don't you just settle for the
first or last (or any other) day of a month (if that is known) or any month
within a year to, at least, have a valid date in your data base.


.
 
Back
Top