Hello Everybody,
I am new to VB. I wanted to know how to get the day & month name using system date. Eg: 04/15/2001 it should show as April 04, Wednesday 15, Year 2001.
Please help me.
thankyou for everything.
Raghu
Printable View
Hello Everybody,
I am new to VB. I wanted to know how to get the day & month name using system date. Eg: 04/15/2001 it should show as April 04, Wednesday 15, Year 2001.
Please help me.
thankyou for everything.
Raghu
You can get everything except "Year", with this.
Might try using 2 format functions to concatenate "Year" into the string.Code:Private Sub Command1_Click()
Dim x As String
x = "04/15/2001"
MsgBox Format(x, "mmmm mm,dddd dd, yyyy")
End Sub
Code:dim dt as date
dt="04/15/2001"
msgbox monthname(month(dt))
msgbox weekdayname(weekday(dt))
Like this
Code:Private Sub Command1_Click()
Dim x As String
x = "04/15/2001"
MsgBox Format(x, "mmmm mm,dddd dd") & " ,Year " & Format(x, "yyyy")
End Sub
That is certainly a strange way to display a date, but this will do it.
Code:MsgBox Format(Now, "mmmm") & " " _
& Format(Now, "mm") & ", " _
& Format(Now, "dddd") & " " _
& Format(Now, "dd") & ", Year " _
& Format(Now, "yyyy")
look at all them posts!! lol
hmm im feeling left out, so im going to make yet another variation of it... :D
-------------------
Private Sub Command1_Click()
Dim DayName As String
DayName = "04/15/2001"
MsgBox Format(DayName, "dddd")
End Sub
-------------------
their... because he said he only wanted the name of the day :P
(dont mind me, im just bored)
oh.. that last post wasent very dynamic..... here..
-------------------
Private Sub Command1_Click()
Dim DayName As String
DayName = Date
MsgBox Format(DayName, "dddd")
End Sub
-------------------