Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Date Format
Message
 
À
07/03/2002 23:08:03
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Titre:
Divers
Thread ID:
00616458
Message ID:
00630061
Vues:
32
You are better place to try it then I am!

This is what I do.
1. My servers are always configured for US dates (they accept mm/dd/yyyy and also yyyy/mm/dd).
2. When I query the database, I can then use "select * from table where ddaattee = '2002/03/08'" without problems (same for insert, update and delete).
3. To show to user on the screen, I use a specific format (ie : yyyy/mm/dd) or the regional settings.
4. To show on paper (reports) the format is always yyyy/mm/dd.
5. All my dates in VB are kept in a Date datatype.

This way, I never have problems.



>>so force the date like the server is requesting (I can say that your server is
>>not configured with default options).
>>sql = "insert into thetable(datecolumn) values('" & format(date, "dd/mm/yyyy")
>>& "')"
>
>do u mean first u shud retrieve whats the date format on the server.
>so if its dmy write the sql for dmy
>and its something else
>write the sql and insert as 'yyyy/mm/dd' format
>
>1. so there would be 2 sqls for every date operation if i want my appl independent of server date format. Right ?????
>
>2. and if regional setting is dd-mmm-yy format would fail, is'nt it ?
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform