Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 175
  • Last Modified:

how to get "Teusday" from "30JUL02"

I want the day of the week from  "30JUL02"
0
josmic
Asked:
josmic
  • 5
  • 2
  • 2
  • +1
1 Solution
 
hesCommented:
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
 
joebenzCommented:
Convert it to 30/07/02 ,then call:

Dim mydate

mydate="30/07/02"
Format(MyDate,"Long Date")
0
 
jayeshshahCommented:
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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
joebenzCommented:
To jayeshshah:
Remember that the format is "30JUL02".
Cheers.
0
 
josmicAuthor Commented:
thanks but sorry input output wrong and and almost working answer b4 yours.
0
 
josmicAuthor Commented:
hes 0 was month/day and 1 was year could not make work for day of week.
0
 
josmicAuthor Commented:
oops that was u thanks
0
 
josmicAuthor Commented:
oops that was u thanks
0
 
hesCommented:
What ?
You accepted jayeshshah's wrong answer ?
0
 
josmicAuthor Commented:
WeekdayName was preffered hes, sorry.
Also your code like mine errs on some diff date setting other then north america.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now