Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Hello again

have a date field that is an auto enter creation date.

I need to format just the day name to a different color.

[color:red]Mondays

[color:green]Tuesday

etc

The field is formatted as Monday, 1 January 2007

I can't seem to get it to work

Help!!!!

Posted (edited)

Thanks for the response

I kinda figured that but can't quite figure out how to do the calc.

Should the date field be a text field or a calc field. And if it is set to auto enter, how do i turn it into a text field?

Remember, I am still new to all this.

Have tried to set it as a calc field results as text and cannot change it to display the way i wanted in the above post. Wednesday, 14 November 2007 displays as 14/11/2007.

Edited by Guest
Posted

Your date field should remain as a date. Create a new calculation field with Result Is Text as shown below:

Case(

DayOfWeek(MyDateField) = 2; TextColor ( "Monday" ; RGB ( 255 ; 0 ; 0 ) );

DayOfWeek(MyDateField) = 3; TextColor ( "Tuesday" ; RGB ( 0 ; 255 ; 0 ) );

DayOfWeek(MyDateField) = 4; TextColor ( "Wednesday" ; RGB ( 0 ; 0 ; 255 ) )

)

Posted

You should probably leave the CreationDate field as it is (if it's not a date, you won't be able to use it for finding or sorting), and add a new field defined as a calculation (result is Text) =

TextColor (

DayName ( CreationDate ) ;

Choose ( Mod ( CreationDate ; 7 ) ;

RGB ( 0 ; 200 ; 0 ) ;

RGB ( 200 ; 0 ; 0 ) ;

RGB ( 0 ; 0 ; 200 ) ;

RGB ( 200 ; 200 ; 0 ) ;

RGB ( 0 ; 200 ; 200 ) ;

RGB ( 200 ; 0 ; 200 ) ;

RGB ( 200 ; 200 ; 200 )

)

) & ", " &

Day ( CreationDate ) & " " &

MonthName ( CreationDate ) & " " &

Year ( CreationDate )

Then use this field for displaying the date.

Posted (edited)

Again Thanks

Comment,

That works Beautifully, I had come to a similar solution the difference was that I got the day name in a text field and applied the formating to it. A little clumsy but it worked. This is a much more elegant solution. It was also good to learn about the chose and mod functions.

Thanks again

Edited by Guest

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