Date and Time Picker

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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 & "#")
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top