Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

First Letter in a field

Status
Not open for further replies.

thehugedeal

Technical User
Jan 9, 2004
38
CA
Hello Everyone. I think this is a pretty easy question but still having problems.

All I need is to have the first letter of the field.

Example

Monday April 05, 2007, Tuesday April 06, 2007, Wednesday April 07, 2007, etc

To

M, T, W etc

I have no idea why I am having issues.

I am using crystal 9.0 and I will also be using this formula in a cross tab. Any help will be great

Thank You

Bru
 
Hi,
What have you tried?

Is should be as simple as:

Left({field_name},1)

Did that not work?



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Or even:

{table.field}[1]

Perhaps it's a date field, in which case you might use:

weekdayname(weekday({table.field}))[1]

-k
 
Sorry for the long delay. The problem was that it was a date field. I just kept on getting errors and could not understand why. Thank You for your help.

So just another question…

weekdayname(weekday({table.field}))[1] is to keep the first letter only. What would I input to keep the first three letters?

Example
Monday, Tuesday, Wednesday
To
Mon, Tues, Wed

weekdayname(weekday({table.field}))[3]would only keep the third letter.


Bru
 
Hi,

Use:

weekdayname(weekday({table.field}))[1 to 3]



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
I had posted that:

weekdayname(weekday({table.field}))[1]

Then you change scope as if we did something incorrectly, you said first character...
 
Note that if the field is a date, you don't need a formula--you can go to format field->date->customize->date tab->month: none->day: none->year: none->dayofweek: short.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top