简体   繁体   中英

Link SQL Table > MS Access with Date/Time

I have tables linked from SQL Server to MS Access. The issues is the date on MS Access doesn't display the non value zeros exam: in SQL 01/01/2016 in Access 1/1/2016. In the query I have this set up RDATE: Left(CStr([RENEWAL_DATE]),**10**) to eliminate the time, but when the date has less then 10 characters part of the time appears.

What I'm looking for is to clear things up. How can I have MS Access display Date like 01/01/2016 rather than 1/1/2016?

Don't ever handle dates like strings. No exceptions.

Here you can use:

RDATE: DateValue([RENEWAL_DATE]) 

In the query design view you can specify the format that Access will use to display a value in your date column. When you are in the design view of your query, right click the date column, choose properties. There you have the format property.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM