Solved

Display WeekDayname as Mon,Tue,Wed...

Posted on 2013-11-06
12
1,156 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
 

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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

707 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now