Solved

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

Posted on 2004-04-05
1
293 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
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…

738 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