Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to change the format in database ?

Status
Not open for further replies.

101287

MIS
Apr 8, 2006
189
US
I have a database that is generate thru an import. The problem that I having is that the format in the date fields needs to be "short date" but the format is blank. I would like to have a macro to change the format to short date.

Can someone help me accomplish that? Thank you.

Luis
 
go to the table, highlight the field and change format propery to short date or whatever takes your fancy mate

JB
 
Thank you. However, I would like to change the table attributes with DDL (Data Definition Language) statements. Like for example, ALTER column ..... something.

Luis
 
My coded is below:
Alter Table xMilestones Alter Column Finish_Date date/time(short date)

But does not work. Need to change the format of the field to short_date format.

 
I believe this can't be accomplished with DDL. You could use DAO code to add and set the Format property. I'm not sure why you would even want to do this since formatting is generally best applied to the text box on a form or report.

Duane
Hook'D on Access
MS Access MVP
 
dhookom - Good advice. Decided to use the Format in a query and changed the field properly.

Thank you.

Luis
 
I never apply formatting in a query either. IMHO, the only place to set the format is in the control on the form or report. The only exception to this would be if you export your query to an external file.

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top