Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Display WeekDayname as Mon,Tue,Wed...

Posted on 2013-11-06
12
Medium Priority
?
2,376 Views
Last Modified: 2013-11-07
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.
0
Comment
Question by:Star79
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
  • 2
12 Comments
 
LVL 22

Expert Comment

by:plusone3055
ID: 39627695
give this a try :)

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

i.Substring(0, 3)
0
 

Author Comment

by:Star79
ID: 39627711
there doesnt seem to be a substring in crystal
0
 
LVL 22

Expert Comment

by:plusone3055
ID: 39627717
are you using Crystal for Visual Studio ??
what version are you using ?
0
Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

 

Author Comment

by:Star79
ID: 39627720
hello,
Yes this question is posted in the crystal reports zone.iam using crystal11
Thanks.
0
 
LVL 22

Assisted Solution

by:plusone3055
plusone3055 earned 1000 total points
ID: 39627740
ah okay in that situation then
LEFT (WeekdayName(DayOfWeek ((today-1)) ),3)
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 1000 total points
ID: 39627772
Try

WeekDayName(DayOfWeek(Today -1), True)

WeekDayName has an optional parameter to abbreviate.  False is the default value.

You can also use
     CStr(Today - 1, 'ddd')

    ToText(Today -1, 'ddd')

mlmcc
1
 
LVL 22

Expert Comment

by:plusone3055
ID: 39627781
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 ??
0
 

Author Comment

by:Star79
ID: 39627869
yes the LEFT solution also works
0
 
LVL 22

Expert Comment

by:plusone3055
ID: 39627886
just wanted to make sure was doing that on the fly  woohoo :)
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 39628039
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
0
 

Author Comment

by:Star79
ID: 39630973
not sure whom to award points
0
 
LVL 22

Expert Comment

by:plusone3055
ID: 39630986
usually whoever got a correct answer first
or if it makes you feel better split the points between us :)
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question