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

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

Recommended Posts

Posted

Right, ive got a small problem, i need to be able to format a date in a certain field like this Saturday 22[color:blue]nd October. Is there anyway to get that second part (the nd) to automatically change according to what the date is... i.e. 21[color:blue]st or 23[color:blue]rd.

Cheers for help, genx

Posted (edited)

For the life of me, I can't understand why you are creating those extra fields, aaa. Day and DayName are already functions. :shocked::wink2:

Hi aflgenx,

This calculation (result of text) will do it all. Just copy/paste it into your calc box then change date to your real field name:

Case(

not IsEmpty( date ); DayName( date ) & " " & Day (date) &

Case(

PatternCount( " 1 21 31 "; " " & Day( date ) & " " ); "st";

PatternCount( " 2 22 "; " " & Day( date ) & " "); "nd";

PatternCount( " 3 23 "; " " & Day( date ) & " " ); "rd";

"th" ) & " " & MonthName( date )

)

The principle behind this pretty thing was gleaned from -Queue-

LaRetta

Edited by Guest
Calc correction
Posted

Hi LaRetta

it is fine... but with a little typo:

Case(not IsEmpty(date); DayName(date) & " " & Day (date)&

Case(

PatternCount( " 1 21 31 "; " " & Day(date) & " " ); "st";

PatternCount( " 2 22 "; " " & Day(date) & " "); "nd";

PatternCount( " 3 23 "; " " & Day(date) & " " ); "rd";

"th" ) & " " & MonthName(date))

Posted

For the life of me, I can't understand why you are creating those extra fields, aaa.

Hi, Laretta! I created this fields only for easy understanding. You are right, this fields is not necessary.

Posted

I created this fields only for easy understanding. You are right, this fields is not necessary.

Hmmm, my concern is that others (particularly those new) may not realize those fields are unnecessary and will duplicate your example exactly to reproduce your suggestion. So instead of adding to their understanding, it adds to convolution instead because they will perpetuate 'fluff' fields unnecessarily. :crazy2:

And each of these unnecessary calculations (used to then combine with the final calculation) will slow a system down substantially. The other issue that is important here is to be sure and type the darned calculations right the first time (my example above). :giggle:

LaRetta

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