Solved

how to get "Teusday" from  "30JUL02"

Posted on 2002-07-30
10
165 Views
Last Modified: 2010-05-01
I want the day of the week from  "30JUL02"
0
Comment
Question by:josmic
  • 5
  • 2
  • 2
  • +1
10 Comments
 
LVL 20

Expert Comment

by:hes
ID: 7188643
Try this:

Dim Temp As String
Dim MyDate As Date
Dim CurDay() As String
Temp = "30JUL02"
MyDate = Left(Temp, 2) & "-" & Mid(Temp, 3, 3) & "-" & Right(Temp, 2)
Temp = FormatDateTime(MyDate, vbLongDate)
CurDay = Split(Temp, ",")
MsgBox CurDay(0)
0
 

Expert Comment

by:joebenz
ID: 7188682
Convert it to 30/07/02 ,then call:

Dim mydate

mydate="30/07/02"
Format(MyDate,"Long Date")
0
 
LVL 5

Accepted Solution

by:
jayeshshah earned 50 total points
ID: 7188715
use the below

WeekdayName(Weekday(Now), True)

here instead of now you can change the date whose day u r needing.

n'joy

Jayesh
0
 

Expert Comment

by:joebenz
ID: 7188728
To jayeshshah:
Remember that the format is "30JUL02".
Cheers.
0
 

Author Comment

by:josmic
ID: 7189265
thanks but sorry input output wrong and and almost working answer b4 yours.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:josmic
ID: 7189268
hes 0 was month/day and 1 was year could not make work for day of week.
0
 

Author Comment

by:josmic
ID: 7189269
oops that was u thanks
0
 

Author Comment

by:josmic
ID: 7189270
oops that was u thanks
0
 
LVL 20

Expert Comment

by:hes
ID: 7189439
What ?
You accepted jayeshshah's wrong answer ?
0
 

Author Comment

by:josmic
ID: 7277590
WeekdayName was preffered hes, sorry.
Also your code like mine errs on some diff date setting other then north america.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
DIR issue 7 51
using Access 8 59
passing parameter in sql procedure 9 57
Exit a vb6 apps when a calling it apps closes 15 43
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

863 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

27 Experts available now in Live!

Get 1:1 Help Now