Solved

Display WeekDayname as Mon,Tue,Wed...

Posted on 2013-11-06
12
1,828 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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 

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 250 total points
ID: 39627740
ah okay in that situation then
LEFT (WeekdayName(DayOfWeek ((today-1)) ),3)
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 250 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
0
 
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 100

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…

751 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