Solved

Display WeekDayname as Mon,Tue,Wed...

Posted on 2013-11-06
12
1,695 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
  • 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

 

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: 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.

Question has a verified solution.

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

680 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