Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 10th, 2007, 07:49 AM
Friend of Wrox
 
Join Date: Jun 2005
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
Default Date Format

Hi All
I am using the following code to check a table for a specific date
 & "WHERE ((([Next Due Date])=" & "#" & Date & "#));"
The problem is that the code is formatted for MM/DD/YYYY.
Does anyone know what the code would be for DD/MM/YYYY
Thanks

Brendan Bartley
__________________
Brendan Bartley
 
Old January 11th, 2007, 08:33 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

I know there have been posts about this several times. You can check the individual dateparts. I would do this, however:

sDate = DatePart("dd", Date) & "/" & DatePart("m", Date) & "/" & DatePart("yyyy", Date)

"WHERE ((([Next Due Date] = '" & sDate & "'"

I think that would work in spite of the data type issues.

HTH

mmcdonal
 
Old January 17th, 2007, 06:08 AM
Authorized User
 
Join Date: Jan 2006
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Default

go to control panel.and change the date format.

 
Old January 17th, 2007, 08:14 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

That would leave them using the wrong date format for the country, and also require all the users to change the date formats on their computers in order for this function to work.

mmcdonal





Similar Threads
Thread Thread Starter Forum Replies Last Post
date format differs, need to force format somehow patricolsson ASP.NET 2.0 Basics 1 December 3rd, 2009 12:53 AM
Convert British format date to American format? fyr PHP How-To 0 December 19th, 2007 03:17 PM
Help with date format gregalb SQL Server 2000 1 February 13th, 2007 10:15 AM
How to give Date format while entering date Subuana Beginning VB 6 4 March 17th, 2006 07:25 AM
date format differs, need to force format somehow patricolsson HTML Code Clinic 2 January 12th, 2006 05:55 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.