Jump to content

Date Entry Forced Hard Format


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

Recommended Posts

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 ) ) 

 

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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! 

Link to comment
Share on other sites

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