Mickdn Posted August 23, 2010 Posted August 23, 2010 I have a Text field that I use to enter information in, nothing special about it, just notes. I have a button next to it that inserts the "Current Date" wherever the cursor happens to be. The date shows as 24/08/2010 is there some way I can get it to show as 24-08-2010.
Raybaudi Posted August 23, 2010 Posted August 23, 2010 Insert Calculated Result [ Substitute ( Get ( CurrentDate ) ; "/" ; "-" ) ]
Lee Smith Posted August 24, 2010 Posted August 24, 2010 You can select how a date is displayed in layout mode. Right Click on the field, and select Date Format. This will not change the data, but it will display the date as you wish. HTH Lee
Mickdn Posted August 24, 2010 Author Posted August 24, 2010 Thanks raybaudi, works fine, except for one minor detail, it removes all the text that is currently in there. To Lee, tried Right Click in Layout Mode and cannot find any reference to date Format. Thanks
Lee Smith Posted August 24, 2010 Posted August 24, 2010 I missed that it was part of a text field. Disregard my post. Lee
Lee Smith Posted August 24, 2010 Posted August 24, 2010 (edited) If the date is located as the first entry in your text field, you only need to add an [color:blue]& YourField to Danielle's calculation. However, if it is in the middle of the text, then you use the Replace Script step instead, it will leave the other text alone. Replace Field Contents [ YourTextField; Replace with calculation: Substitute ( YourTextField ; "/" ; "-" ) ] [ No dialog ] Keep in mind, that if you have any other [color:blue]/ in your text, they will be replaced too. The Replace is an agressive function, and can not be undone. HTH Lee Edited August 24, 2010 by Guest
comment Posted August 24, 2010 Posted August 24, 2010 it removes all the text that is currently in there. Deselect the "Select entire contents" option. BTW, you should consider creating a new record for each note, with a dedicated field for the date - instead of cramming everything into one field.
Mickdn Posted August 24, 2010 Author Posted August 24, 2010 Thanks comment, I'm annoyed I can miss the simplest things! Thanks to FM Forums again.
Recommended Posts
This topic is 5264 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