Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Arrrrgh! I Can't Get A Date!

Status
Not open for further replies.

LegoPiece

Programmer
Mar 19, 2001
95
US
I have a Calendar control in my application, and when the user clicks on a day, I want to take that information to ascertain the day of the week. Problem is that I can't seem to format the clicked calendar information into a date format.

Private Sub MyCal_Click()
'------------------------------
dim dt as Date

dt = MyCal.Month/MyCal.Day/MyCal.Year
'The Value I get here is 12:00AM (!)

msgbox Weekday(dt) 'This always yields '7'

'------------------------------
End Sub

Any Thoughts? Peace
Lego

"I don't think we have the right or the wisdom to interfere with an alien tribe no matter how it's evolving!" - Captain James T. Kirk

"Your people must embrace these words and the words that follow, for their true meanings are..." - Captain James T. Kirk (same episode)
 
John,

Jeez... I forgot to thank you the last time I logged on dude - but - it worked! You will be blessed and rewarded in a later life.... =)

Peace
Lego

"I don't think we have the right or the wisdom to interfere with an alien tribe no matter how it's evolving!" - Captain James T. Kirk

"Your people must embrace these words and the words that follow, for their true meanings are..." - Captain James T. Kirk (same episode)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top