borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (if...if...else/if elseif.../if...ifnot)Next Topic (Useful String Functions) New Topic New Poll Post Reply
AndreaVB Forum : Frequently Asked Questions : IMHO:Dates and MS-SQL/Access
Poster Message
stickleprojects
Level: Moderator


Registered: 09-09-2002
Posts: 891

icon IMHO:Dates and MS-SQL/Access

Hi all,

MS defaults to US date format when it can, so I suggest don't use any format apart from medium..
e.g.

dt1 = Format(MBox1.Text, "dd/mm/yyyy")
dt2 = Format(MBox2.Text, "dd/mm/yyyy")

rs.Open "SELECT * FROM rawdata WHERE dateofissue >= '" & format(dt1,"dd mmm yyyyy") & "' AND dateofissue <= '" & format(dt2,"dd mmm yyyy") & "'", conn, 3, 2, 1

Also,
note that MS accepts UK-english as well as US-english date formats inherently(?) so, this code works in germany and india too (despite the obvious language differences).

Thoughts guys?
Kieron



____________________________
Build it better, faster, quicker, easier.. then fix it (non-offical MS mission statement)

24-09-2005 at 02:44 AM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : Frequently Asked Questions : IMHO:Dates and MS-SQL/Access
Previous Topic (if...if...else/if elseif.../if...ifnot)Next Topic (Useful String Functions) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder