remove hrs, minutes, secs from dateTime Fields

  • Thread starter Thread starter harrykp via AccessMonster.com
  • Start date Start date
H

harrykp via AccessMonster.com

how do i get my date field on a form to record only dates and avoid adding
the hours minutes and seconds. Any help will be appreciated. Thaks
 
The data is actually being recorded in the data table so you have to make
changes there if you don't want the raw data to include the time. As far as
displaying the data in the form, change the format of the control to
mm/dd/yyyy or something without the time. You can also force users to follow
a convention by applying an input mask and/or a validation rule via the
control's data properties.
 
The DateValue function will return only the date portion of a datetime field
=DateValue(Now()) for example would be the same as =Date()
so you can use it to remove the time from your data. If you need to clean
up your table, create an undate query. In the query builder, put this in the
Update To row using the actual field name:

DateValue([MyDateField])
 
Thanks all. You have made my day!
The DateValue function will return only the date portion of a datetime field
=DateValue(Now()) for example would be the same as =Date()
so you can use it to remove the time from your data. If you need to clean
up your table, create an undate query. In the query builder, put this in the
Update To row using the actual field name:

DateValue([MyDateField])
how do i get my date field on a form to record only dates and avoid adding
the hours minutes and seconds. Any help will be appreciated. Thaks
 
Back
Top