Solved

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

Posted on 2004-04-05
1
280 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
1 Comment
 
LVL 43

Accepted Solution

by:
TimCottee earned 50 total points
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

771 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

12 Experts available now in Live!

Get 1:1 Help Now