Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can i place an standar format for my date in a DTpic
Message
 
To
08/10/2001 21:32:40
General information
Forum:
Visual Basic
Category:
ActiveX controls
Miscellaneous
Thread ID:
00565776
Message ID:
00565786
Views:
16
This message has been marked as the solution to the initial question of the thread.
>hello to all!
>
>im working in a new type of operative system, windows ME, and im having some problems with the format im getting from a DTpicker control, since im letting it in and trying to use it as a normal date, but something is not working good at all, when im trying to get the date format from a query, like
>"SELECT * FROM TBLCLIENTS WHERE CLIENT_ID > 0 AND DATE BETWEEN #12/02/2000# AND #12/03/2001# ORDER BY LASTNAMË"
>
>what is wrong with this, is there a way that i can use an standar date format that can avoid the operative system rules and work with the format i programmed to work with?
>
>let me know, if you can my friends!
>
>let me know how i can attach my proyect to this email so you can see what i say, and see what is wrong in it!

The way to pass date into SQL queries is engine-dependent.

I think that you are working with Access DB and Access accept the yyyy/mm/dd format as universal.

You can use the Format function something like this:
strSQL = "SELECT * FROM TBLCLIENTS WHERE CLIENT_ID > 0 AND DATE BETWEEN #" & format(dtp1.value,"yyyy/mm/dd") & "# AND #" & format(dtp2.value,"yyyy/mm/dd") & "# ORDER BY LASTNAMË"
You cannot attach project to messages into this newsgroup.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Reply
Map
View

Click here to load this message in the networking platform