AvrioTech Posted August 28, 2008 Posted August 28, 2008 I know this may seem odd to some people, but im trying to get a date field to be quicker for data entry.. Ex instead of typing 01/01/01 as a date you can type 010101 and Auto-Enter an auto enter calculation will format it to a correct date format of 01/01/01. My Calculated auto entry is: Case ( Length ( datetest )=6 ; Date ( Left ( datetest ;2 ) ;Middle ( datetest ; 3 ;2 ) ; Right ( datetest; 2 ) )) Pretty Simple and straightforward... but the problem is I always get errors of wrong date format. Any ideas how to do this?
Raybaudi Posted August 28, 2008 Posted August 28, 2008 Hi you can't do that in a DATE field. But you can do in a text field, even better using a custom function like this: http://www.briandunning.com/cf/373
AvrioTech Posted August 28, 2008 Author Posted August 28, 2008 (edited) Ive tried that and it works but theres one little issue... I sort the portal records by date and when the portal is shown, the order isnt correct. Edited August 28, 2008 by Guest
Raybaudi Posted August 28, 2008 Posted August 28, 2008 That is because the result of that CF is text ( pseudo_date ) NOT date. So you need a new calc field, result date, with the calc: GetAsDate ( pseudo_date) and sort by it.
Vaughan Posted August 28, 2008 Posted August 28, 2008 So in order to make easier data entry, we've needed to store a date in a text field with an auto-enter calc to parse out the entry, then make a date field with a calc that parses out the entry in the text field. All of this to save the user from typing //...
Raybaudi Posted August 28, 2008 Posted August 28, 2008 What we don't do for our user ! BTW: I didn't like to type those /, too.
comment Posted August 29, 2008 Posted August 29, 2008 So in order to make easier data entry, we've needed to store a date in a text field with an auto-enter calc to parse out the entry, then make a date field with a calc that parses out the entry in the text field. Yes and no. Yes, Filemaker validates a date field BEFORE applying an auto-entered calculation (unless you are using a custom dialog for the entry). No, you could enter the shorthand into a global text field and have the date field grab it from there AND do the conversion to a date at the same time. Note, however, that it's real easy to get invalid dates into the date field this way (since the auto-entered result is NOT validated).
Recommended Posts
This topic is 5934 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 accountSign in
Already have an account? Sign in here.
Sign In Now