Date and Time Picker

F

Fiachra

Hi

Iam using the Date and Time picker to allow users to selct a date, however
it goes into the database as the date selected and the current time, I only
want the date to go into the database. I have set the format as dd/MM/yyyy.
Is there any way of stopping it adding the time in aswell

Thanks
Fiachra
 
W

Wayne Morgan

Setting the Format on the field or textbox will only make the item display
the way the format is set, not change the value of the underlying data. I
would first look at the date/time picker you're using to see if it has an
option to return only the value you want. If that won't work, then in the
AfterUpdate event of the textbox, try something like:

Me.txtMyTextbox = DateValue("#" & Me.txtMyTextbox & "#")
 
A

Al Camp

Fiachra,
Somewhere in your Date & Time picker code, it is concatenating
(combining) the Date and Time before updating your Date field. Find that
code, and remove the Time element.
 
Top