stickleprojects Level: Moderator

 Registered: 09-09-2002 Posts: 891
|
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)
|