Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Auto Format Date Field without entering /

Featured Replies

Is there an easier way to enter a date without having to type in the forward slash? I have used the same technique as used with phone numbers and everything works fine except in order to find the correct date the find has to be done in the calculation field because some users may type the date values differently.

For example I have a text field named "date" and a calculation field named "c_date". Just like the phone number format technique.

Lets say USER A types in the following value in the date text field: 07082003

The c_date calculation will output 07-08-2003. This is fine and dandy if all the users entered the dates the same way but lets say USER B types in 782003. My calculation works properely and will output 07-08-2003 however if you try to perform a find for all records containing 07082003 in the date text field the USER B record will not show up.

The only solution I can think of is to do a search in the calculation field.

Any suggestions? I know this seems to be a minor thing but my client is going to be entering several thousand records each month and we are trying to make it as easy as possible. Excel lets you do this.

Another option would be to have 3 text fields for the date and have the system automatically go to the next field upon completion of that field.

Something like Javascript. After entering the month have the system automatically go to the day, then year etc..

Why not make a button and have it enter the current date instead?

Lee

cool.gif

Hi,

"I know this seems to be a minor thing but my client is going to be entering several thousand records each month and we are trying to make it as easy as possible. " Let them enter whatever they want - let FM convert it for you.

I've seen many workarounds - stacking calcs, etc. The only example I've seen which actually accepts user input of dates and will accept dashes or dots as separators, as well as accept two-digit year, is a new demo by CobaltSky at:

Custom Date Validation

The second demo, Date Magic, uses no scripts or stacked calcs! It uses relationships and lookups. The User types a date in whatever format they choose and it's nicely converted for them! And don't let that conversion calc scare you - just copy and paste it and it'll work fine! smile.gif

LaRetta

  • Author

Unfortunately it will not be the current date. This is for the contributions module for a large church database I am developing with filemaker. The reason they are being particular is they have to manually enter each donation / offering given each Sunday & Wednesday service. We have about 2,000 members who give each Sunday. Each gift is recorded so that we can issue giving statements at the end of the year to our members for tax reasons.

There is an offering date and a deposit date we are recording. I have setup a batch entry process in which the system automatically remembers the offering date and deposit dates on new records which is working great so maybe they just need to deal with the fact that Filemaker can not autoformat the dates.

They are just used to excel in how it will auto format the dates without entering the forward slashes.

So, if the user inputs 1112003, what date is that?

Or 112003?

Unlike phone numbers, FileMaker directly supports Date formatting.

I recommend that you use it. The user can use /'s or -'s, whichever

is easier for them to use. You can specify the formatting that you

prefer to see. And then the user can do finds with ranges and such

using the same formatting that they are used to when inputting.

BTW, they only have to enter the month/day and the rest is entered automatically as long as the year is current. In other words enter 7/30 and you get 7/30/2003.

Lee

smile.gif

  • Author

Good Point. I agree with you that they should type in the dates with /'s or -'s. I will talk to my client and make them understand.

Thanks!!

I recently came accross a solution where the developer had opted for a dynamic input mask for either dates or text.

It wasn't so bad for phone format and think I may adopt it, while for dates,it seems the date was entered as a text field with 8 digits without "/ " or "- ", then auto-converted after validation to a date calculation.

A bit tedious...

The tip comes from http://www.fmfiles.com and is called "Dynamic Input Mask". It shows how to format multiple phone formats, but you can try it for dates too (with some validation calculations)...

I can't locate the file you speak of, Ugo. Search for 'dynamic input mask' yields no results on fmfiles.com.

Thanks. It would be nice if I could actually download the file without getting an error. Is this site located in Europe or what?

I just did a test download of the file and it came in without any problems.

smile.gif

You got lucky. I just keep timing out, I guess.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.