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

x
?
Solved

How to get around using the  'WeekDayName' function in VB 5.0?

Posted on 2004-04-05
1
Medium Priority
?
304 Views
Last Modified: 2008-02-07
I'm currently using VB 5.0 and need to extract the weekdayname from a Now() using 'Format'. I need just the name of the weekday, e.g. Wednesday, Thursday. And then how to display a older weekday name something like:


'Pseudo code below
TodayIS = Now()
NameOfDay = Format(TodayIS, weekdayname) - 2  ' Would give you Saturday since today 04/05/2004 is Monday

Any Ideas??
Rich
0
Comment
Question by:Richard Kreidl
[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
1 Comment
 
LVL 43

Accepted Solution

by:
TimCottee earned 200 total points
ID: 10758129
Hi rkckjk,

Format(Now(),"dddd")

Should do it.

Likewise:

Format(DateAdd("d",-2,Now()),"dddd")

For two days ago.

Tim Cottee
Brainbench MVP for Visual Basic
http://www.brainbench.com
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

661 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