Link to home
Start Free TrialLog in
Avatar of Star79
Star79Flag for United States of America

asked on

Display WeekDayname as Mon,Tue,Wed...

Hello,
I have a formula in crystal to display the weekday name

WeekdayName(DayOfWeek ((today-1)) ) this displays Tuesday

Is there any way to display as 'Tue' just the 3 letters.
Avatar of plusone3055
plusone3055
Flag of United States of America image

give this a try :)

Dim i As String = WeekdayName(DayOfWeek ((today-1)) )

i.Substring(0, 3)
Avatar of Star79

ASKER

there doesnt seem to be a substring in crystal
are you using Crystal for Visual Studio ??
what version are you using ?
Avatar of Star79

ASKER

hello,
Yes this question is posted in the crystal reports zone.iam using crystal11
Thanks.
SOLUTION
Avatar of plusone3055
plusone3055
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
mlmcc

I dont have crystal open atm but left would also work correct ???

if you look at hte thread i origianlly thought of a substring but they are not using visual studio..

just curious as to my LEFT solution working ??
Avatar of Star79

ASKER

yes the LEFT solution also works
just wanted to make sure was doing that on the fly  woohoo :)
Avatar of Mike McCracken
Mike McCracken

It will work when the abbreviation is 3 letters as in English.  Other languages may not always use 3 letters.

It also may be slower since there are extra function calls which may not be as efficient as the single function call using the tools available.

mlmcc
Avatar of Star79

ASKER

not sure whom to award points
usually whoever got a correct answer first
or if it makes you feel better split the points between us :)