Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted (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 by Dr. Evil
Posted

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.

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

 

Posted

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?

Posted

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

Posted (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 by Dr. Evil
Posted

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! 

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