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.

Date Entry Forced Hard Format

Featured Replies

I wish to replace entry via field calculated value from:
2/13/2017
2-13-17
...etc

to: 02/13/2017
Including the "leading zeros" month, day, year format, and use of "/".
Anyone have a canned calculation I can plug in here?

I wish to go beyond simple data formatting facade.

Edited by Dr. Evil

Why is simple date formatting not sufficient in your case?

  • Author

i'm just being fickle... when using a pull down date menu, by default, the date is entered in 2/13/2017. I like to display with leading zeros, just so in list, alignment is more pleasing. Also, in some cases, I have some calculations that combine multiple fields, thus destroying the date formatting option via inspector. I know I can separate merge fields if needed, and I will regain formatting option again. But nice to know how to do this if I ever choose to.

I don't believe the desired target format destroys data in any way. plus, would be nice if user could be controlled automatically, and prevent odd data entry.

8 minutes ago, Dr. Evil said:

when using a pull down date menu, by default, the date is entered in 2/13/2017.

What's a "pull down date menu"? Do you mean a drop-down calendar? That will enter dates according to the date format used by your file. If you want it to enter leading zeros, set your OS system's short date format to MM/DD/YYYY, clone your file, import the data into it and - if you want it to stick regardless of OS format - select 'Always use file's saved settings' in File Options.

To convert any date to a text string in MM/DD/YYYY format, you can use:

SerialIncrement ( "00" ; Month ( YourDate ) ) & SerialIncrement ( "/00" ; Day ( YourDate ) ) & SerialIncrement ( "/0000" ; Year ( YourDate ) ) 

 

  • Author

yes, sorry, I meant "drop-down calendar" =).

i found the 'always use file saved settings' and have it selected.
sorry, where to I set file settings for date format?

File's settings are inherited from the OS when the file is created/cloned. (Strictly speaking, a clone inherits the settings of the OS where it's opened for the first time.)

  • Author

hmmm, i don't see an option in my OS to include a leading 0.
or any other options for that matter. =P

Edited by Dr. Evil

System Preferences > Language & Region > Advanced

  • Author

BRAVO! Problem solved! Thank you guys very much!

I've simply set FMP File to always use OS settings,
and set my preferred date format in OS preferences as directed above.

I wil not bother converting previous entries, in my mind, its not a big deal.
But this is a very clean solution, one that I did not understand until now.

:) Thanks again! 

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.