Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 7333 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

I have a standard date field. Some of the dates I am enetering are complete ie. dd/mm/yyy and will display fine. Some of the dates I have are year only. I cannot enter year onlt without getting an error. I'm sure there is an easy way to do this :-) Cheers

Posted

2004 is not a date; it is either number or text. So a field containing only the year should be either number or text, not date.

  • Newbies
Posted

I know about the use of Text as a field rather than Date ... problem is I need it to be a Date field for those dates I have ... is there a way of enetering wild cards or something similar so thatFMP will let me enter incomplete dates?

Posted

Incomplete dates are not dates and so cannot be used in date fields. The only semi-exception is that FM will assume the current year if you enter month and day but no year. 12/1 will convert to 12/1/2004. But it makes no sense to enter a month and year or day and year and end up with a date result.

Posted

Keiron,

How can you use a genuine Date field for only some of your records? If you are sure you can separate the duds from the real dates, use a text field and, when you've identified your genuine values, use the TextToDate function.

Posted

2004 is not a date; it is either number or text. So a field containing only the year should be either number or text, not date.

This is only half as daft as it seems at first sight, one date consists of 24 hours while a year consists of 8760 hours approximately - both representing commonly agreed abstractions for timespans. The problem is that while a day is the time it takes to make earth rotate around it own axis, is the less grained matters as month and year due to approximations including leap days more tricky measures to adjust the way the earth travels around in it's solarsystem.

A solution must be to allow the user to enter specific dates as well as years in textfields by counting delimiters and construct keys like Edoshins SmartRanges keys accordingly. While letting the entry of 2004 mean the entire year and incomplete dates such as 12/21 mean the date at present year...

--sd

Posted

Soren: Well, then, use two separate fields: one would be a regular date field and another would be for whole years or whole months or days.

Posted

If I needed to do something like this in FileMaker, I would just store the day, month, and year values each in a separate number or text field, and compute the actual date values as needed. Then you could search for blank months, or blank days, etc...

Depending on how the data is being used, it could make sense to have a date field stand for a whole year. I've seen things like this in project management apps before.

The usual way to do this is to assume that incomplete dates actually represent an arbitrary real date. For example you could define a year-only entry as actually meaning the first date of the year, and assume an implicit 01/01 on the front of any year-only date. This is really no different than assuming the current year for dates that don't include the year, it's just not as intuitive. The problem is that the users must understand what the entries are for, so it's really not appropriate in a general-use application IMHO.

  • 2 weeks later...

This topic is 7333 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.