ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   get day from date (https://www.excelbanter.com/excel-programming/313129-get-day-date.html)

Greg Billinge

get day from date
 
Hi,

I have a date entered by the user into an input box in the form dd/mm/yy. I
want to be able to tell if that date is on the weekend. Is there a
function/way to say if, for example, 10/10/04 = Sunday?

Many thanks in advance

Greg

Bob Phillips[_6_]

get day from date
 
If Weekday(CDate(ans),1) = vbSaturday Then
MsgBox "It's Saturday"
End If

--

HTH

RP

"Greg Billinge" wrote in message
...
Hi,

I have a date entered by the user into an input box in the form dd/mm/yy.

I
want to be able to tell if that date is on the weekend. Is there a
function/way to say if, for example, 10/10/04 = Sunday?

Many thanks in advance

Greg





All times are GMT +1. The time now is 06:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com