Jump to content
Server Maintenance This Week. ×

Auto-enter by calculation question...


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

Recommended Posts

I love the fact that FileMaker 7 allows for defining a field to Auto-enter by calculation and using that field in the calculation. I used to create two fields for every date field in my solution. One text field for the entry of the date without slashes like "01012004" and one calculation field whose result would return a formatted date like "1/1/2004".

I thought I would be able to just define a date field(Date), tell it to auto-enter by calculation using:

Date ( Left(Date;2); Middle(Date;3;2) ; Middle(Date;5;9999))

and be done with it. However, every time you enter a date like "01012004" into the date field, the invalid date dialog box comes up instead of the "01012004" being converted to a valid date.

Any thoughts? I would love to keep the number of fields in my solution to a minimum by using the new functionality.

Link to comment
Share on other sites

Your field either has to be defined as a Date field or a Text field. A Date field must conform to the accepted date formats. A Text field can look like a number or a date, unfortunately to do any type of date calculations with text fields, you have to convert them to date first with GetAsDate(TextDate). And sorting dates in a text field will sort them as text, not by date.

Link to comment
Share on other sites

This topic is 7121 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.