pedie
Well-known Member
- Joined
- Apr 28, 2010
- Messages
- 3,875
Hi, is this the right way to declare a date variable?
This seems to work but thought, why not confirm it.
Code:
[/FONT]
[FONT=Courier New]Dim x As Date[/FONT]
[FONT=Courier New]x = #9/12/2011# 'or x = me.datetextbox.value[/FONT]
[FONT=Courier New][/FONT]
[FONT=Courier New]MsgBox Format(x, "MMMM")
MsgBox "Q" & Format(x, "Q")
MsgBox Format(x, "YYYY")
This seems to work but thought, why not confirm it.