Day from date..

mshelley1

Carbo
Local time
Yesterday, 18:15
Joined
Feb 12, 2006
Messages
45
Access 2000:

Text1= Date
Text2= Weekday

Is it possible, using code, to convert the date in textbox1 to the corresponding weekday and place that value in text2?
 
Here's a simple little function that demonstrates converting a date into it's weekday name.

Hope this helps!

-----------------

Function WeekdayFromDate()

varDate = InputBox("Enter a date:")

varWeekdayNum = DatePart("w", varDate)

varWeekdayName = WeekdayName(varWeekdayNum)

MsgBox (varDate & " is on " & varWeekdayName)

End Function
 
You don't need any code, just set the display format for the field to "dddd"
 

Users who are viewing this thread

Back
Top Bottom