Solved

Display WeekDayname as Mon,Tue,Wed...

Posted on 2013-11-06
12
1,450 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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 

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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

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…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

803 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