Solved

how to get "Teusday" from  "30JUL02"

Posted on 2002-07-30
10
169 Views
Last Modified: 2010-05-01
I want the day of the week from  "30JUL02"
0
Comment
Question by:josmic
[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
  • 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
Industry Leaders: 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!

 

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
 

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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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 …
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 Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month6 days, 5 hours left to enroll

627 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