Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Format date in select
Message
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Divers
Thread ID:
00633784
Message ID:
00637201
Vues:
18
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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform