5 Replies Latest reply on Sep 13, 2012 8:19 PM by schamblee

    Can't Apply Text Formatting to date fields

    algae592002

      Title

      Can't Apply Text Formatting to date fields

      Post

           Is there any way to apply text formatting to fields other than text fields, without having to create mask fields?

        • 1. Re: Can't Apply Text Formatting to date fields
          schamblee

               You can apply text formatting to date fields. In Edit Mode select the date field then select the font and font size you want.  You can also change formatting in the inspector: Click the data tab and then under Formatting select the calendar icon then select the desire format.

          • 2. Re: Can't Apply Text Formatting to date fields
            algae592002

                 Thanks for replying. I guess I need to explain myself a little more. I know what you state. I'm refering to the text formatting functions that can be used in the calculation part of a field. (e.g.: textcolor(text;rgb(0;0;0)), etc. When trying to use them with date fields, they don't seem to work like with text fields.

                 So my question is: Is there a way around to get the results I want when referencing a date field?

                 Make sense?

            • 3. Re: Can't Apply Text Formatting to date fields
              philmodjunk

                   In order to discuss ways to get around that limitation, we need to know more precisely what you are trying to do with such formatting functions.

                   Conditional formatting might be an option in some cases.

                   Simply specifying a text color for the field is even simpler, but your response appears to indicate that this is not a workable option in your case.

                   Putting the date function inside as "getastext" function call and putting that inside the textformatting function call might be another option, but then your result is of type text and that may create other issues for you.

              • 4. Re: Can't Apply Text Formatting to date fields
                algae592002

                     OK. Here's the scenario:

                     I have a DOB field as a date field. Then I have a calc field that hasDOB_Trim( "trim(DOB)") so it gives me something like this: 01201989 (from the original 01/20/1989. Then I have another calc field "DOB Mask" that would change color and style of characters, based on what Mig.Status field has (either M, E, N). Condition is: if mig. Status = "M", then characters of trimmed DOB changes to black and bold. If not it changes to grey and mornal style.

                     Make sense?

                      

                     DOB (date) ---> DOB_Trim(trim(DOB)) --> case( Mig.Status = "M"; textcolor(textstyleadd(DOB_Trim;bold);rgb(0;0;0));Mig.Status not equal to "M"; textcolor(DOB_Trim;rgb(0;0;0))

                     Just trying to ilustrate the logic I'm using to set up the behaviors I'm wanting. Hope this makes sense.

                     In any case, thank you for even looking into this. I really appreciate it.

                • 5. Re: Can't Apply Text Formatting to date fields
                  schamblee

                       Sounds like you need to be using Conditional Formatting. Under Condition change "value is" to "formula is" and then use your formula.