Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Format date in select
Message
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Miscellaneous
Thread ID:
00633784
Message ID:
00637201
Views:
19
Hi!

If you have a connection to an Access Database then the format() function will work, but if it is to a Sql Server Database then you have to use the convert() function from t-sql, for example:

select idtable, convert(nvarchar(10), shipdate, 111) as shipped from tableX

In this query string the 111 inside the convert function represents the format you want to give to the date: 111 is yyyy/mm/dd format, for all the other formats take a look at the Sql Server Books OnLine.


Arnaldo Colon.
Previous
Reply
Map
View

Click here to load this message in the networking platform