Date/Time when only year is known

Alriemer

Board Regular
Joined
Aug 18, 2002
Messages
102
I have a table of 994 composers and conductors born between 1170 and 1975. For some of them, only the year of birth or death is known. The fields for DOB and DOD are formatted as Date/Time, which refuses 4-digit years. Does anyone know a way around this? I am reluctant to use arbitrary days and months (say 1/1/1170) given the fuzz that would introduce to the data.

Thanks
Alriemer
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Not sure -- unless you know the date, anything you enter instead will be a fudge. Access (and any other app that does dates) assigns a unique integer to each date in its calendar. Just entering a year will usually default to 1 January.

Denis
 
Upvote 0
Assuming the DOB is in the same column for each, it is possible to use VBA to change the format of the cell if the data is only 4 characters. Unfortunately it will take me longer to figure out the correct code than for someone else to see this and reply. But at least I'll learn from it!

HTH
 
Upvote 0
Here's an idea:
You could add two Yes/No fields to your table and call them something like "DOB_Known_Y_N", "DOD_Known_Y_N". If the actual Date is known rather than just the Year, then Check would be Selected, if not known, then not Selected. When you want to properly show your Data, then you could use a simple Iif function in a query:

Code:
BirthDate:Iif([DOB_Known_Y_N]=False, Year([DOB]),[DOB])

which would return the DD/MM/YYYY date if DOB is known and return just the YYYY if DOB is not known. Repeat for the DOD field.
 
Upvote 0
The last sounds like the best approach. At the moment, mostly concerned with ease of entry. I'll experiment with dynamic fields.
Thanks much
Alriemer
 
Upvote 0

Forum statistics

Threads
1,221,621
Messages
6,160,879
Members
451,675
Latest member
Parlapalli

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top