Solved

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

Posted on 2004-04-05
1
290 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:rkckjk
[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 50 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…

749 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