Help me Help !!!!

R

reneabesmer

Hiiiiiii
first of all i hope u people are doing well. May God Bless ,
i have a problem with designing a table. i have a Field in my table that is
for Date of Birth i mean Date/Time field.
and i have Medium Format Property selected for it. and i Enter Dates like

Date_Of_Birth
10-Mar-1980
3-Dec-2005

but sometime i need to enter a date of birth like 1980 and it has not month
or day it is just 1980 but it can't be supported by date/time field
so plz i need help that can support both
10-Mar-1980
1980

thanks
 
R

Rick Brandt

reneabesmer said:
Hiiiiiii
first of all i hope u people are doing well. May God Bless ,
i have a problem with designing a table. i have a Field in my table
that is for Date of Birth i mean Date/Time field.
and i have Medium Format Property selected for it. and i Enter Dates
like

Date_Of_Birth
10-Mar-1980
3-Dec-2005

but sometime i need to enter a date of birth like 1980 and it has not
month or day it is just 1980 but it can't be supported by date/time
field
so plz i need help that can support both
10-Mar-1980
1980

thanks

You cannot do this with a DateTime field. You would either have to change the
type to Text or just enter January 1 anytime you only know the year.

Note that changing the type to Text will introduce validation problems and make
date calculations more difficult and less efficient as you will have to first
convert them to dates.
 
T

Tom via AccessMonster.com

You can use different fields for day, month, and year, and still use the
date/time in each one

-Tom
 
R

reneabesmer

hiiiiii Rick Brandt you right that i can't use both 1980 or 1-Mar-1980 in
the same data/time field but i must need it and need solution for it. even i
am already using Text Field for 1980 or 1-Mar-1980 but it gives me Error and
i can't calculate or find a specific date correctly. it is like a challenge
for me and hope u are the one that u can find a way by discussing it wtih me
.. hope u may hlep me. i will appreciate that with my heart.
thanks Naveed
 
R

reneabesmer

Rick Brandt the second problem that i have that when i need to export my data
2 Ms excel so i used the command "Anaylze it with Ms Excel" from Tools menu
but when i apply different kind of If( ) checks so it don't work i guess the
Date Field Change to Text that why i get no result even my Formula and if ( )
have no problems . hope u can help me in this way 2 i will be thankful.
thanks naveed
 
P

peregenem

reneabesmer said:
you right that i can't use both 1980 or 1-Mar-1980 in
the same data/time field but i must need it and need solution for it. even i
am already using Text Field for 1980 or 1-Mar-1980 but it gives me Error and
i can't calculate or find a specific date correctly.

Suggestion: store as DATETIME but flag when day/month cannot be relied
upon e.g.

CREATE TABLE Test1 (
key_col INTEGER NOT NULL,
DOB DATETIME NOT NULL,
IgnoreDayAndMonth LOGICAL);

Going slightly further, ensure an 'unreliable' date/time has day=1 and
month=1 (1-Jan-1980) e.g.

CREATE TABLE Test2 (
key_col INTEGER NOT NULL,
DOB DATETIME NOT NULL,
IgnoreDayAndMonth LOGICAL,
CHECK(1 =
IIF(IgnoreDayAndMonth = 0, 1,
IIF(DAY(DOB) = 1 AND MONTH(DOB) = 1, 1, 0)
)
)
);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top