Dr. Evil Posted January 31, 2017 Share Posted January 31, 2017 (edited) 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 January 31, 2017 by Dr. Evil Link to comment Share on other sites More sharing options...
comment Posted January 31, 2017 Share Posted January 31, 2017 Why is simple date formatting not sufficient in your case? Link to comment Share on other sites More sharing options...
Dr. Evil Posted January 31, 2017 Author Share Posted January 31, 2017 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 More sharing options...
comment Posted January 31, 2017 Share Posted January 31, 2017 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 More sharing options...
Dr. Evil Posted January 31, 2017 Author Share Posted January 31, 2017 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 More sharing options...
comment Posted January 31, 2017 Share Posted January 31, 2017 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.) Link to comment Share on other sites More sharing options...
Dr. Evil Posted January 31, 2017 Author Share Posted January 31, 2017 (edited) hmmm, i don't see an option in my OS to include a leading 0. or any other options for that matter. =P Edited January 31, 2017 by Dr. Evil Link to comment Share on other sites More sharing options...
webko Posted January 31, 2017 Share Posted January 31, 2017 System Preferences > Language & Region > Advanced Link to comment Share on other sites More sharing options...
Dr. Evil Posted January 31, 2017 Author Share Posted January 31, 2017 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now