Format Date in Table

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

Guest

I have a date format of, 01 11 2006 in the column. I need to change it to
where it is 01/11/2006. I tried to write an update query for this but not
sure how to add the "/"? Any help would be appreciated.
 
T said:
I have a date format of, 01 11 2006 in the column. I need to change
it to where it is 01/11/2006. I tried to write an update query for
this but not sure how to add the "/"? Any help would be appreciated.

Assuming that is a Text field...

UPDATE TableName
SET FieldName = Replace(FieldName, " ", "/")
 
What the field type?
If it's text and there is a space between the day, month and year you can
use the replace function to replace space with /

Replace ([FieldName]," ","/")

If the field type is Date/Time change the format of the field in the table.
 
T said:
I have a date format of, 01 11 2006 in the column. I need to change it to
where it is 01/11/2006. I tried to write an update query for this but not
sure how to add the "/"?


Either the column is a date type field and you are using the
field's Format property to display it without the slashes or
it's a Text field and that's its value.

In the former case, just change the Format property where
ever you display it.

In the latter case, you can use a calculated field in a
query or text box to replace the spaces with slashes:
Replace(thefield, " ", "/")
Note that this will make the field uneditable.
 
Back
Top