Link to home
Start Free TrialLog in
Avatar of josmic
josmic

asked on

how to get "Teusday" from "30JUL02"

I want the day of the week from  "30JUL02"
Avatar of hes
hes
Flag of United States of America image

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)
Avatar of joebenz
joebenz

Convert it to 30/07/02 ,then call:

Dim mydate

mydate="30/07/02"
Format(MyDate,"Long Date")
ASKER CERTIFIED SOLUTION
Avatar of jayeshshah
jayeshshah
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
To jayeshshah:
Remember that the format is "30JUL02".
Cheers.
Avatar of josmic

ASKER

thanks but sorry input output wrong and and almost working answer b4 yours.
Avatar of josmic

ASKER

hes 0 was month/day and 1 was year could not make work for day of week.
Avatar of josmic

ASKER

oops that was u thanks
Avatar of josmic

ASKER

oops that was u thanks
What ?
You accepted jayeshshah's wrong answer ?
Avatar of josmic

ASKER

WeekdayName was preffered hes, sorry.
Also your code like mine errs on some diff date setting other then north america.