Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / November 2006

Tip: Looking for answers? Try searching our database.

Weird Date Problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lythandra - 01 Nov 2006 17:26 GMT
Hi there,

I am having a weird date problem and I just cannot figure out why.

I have some date data in a table which when I pull all of them and put them
in ascending order looks like this:

10/2/2006
10/20/2006
10/22/2006
10/24/2006
10/24/2006
10/29/2006
10/30/2006
10/5/2006

The problem record is the last one which will not sort correctly. I have
double and triple checked to make sure the data is in Short Date format.

For reports I simple cannot get the problem record (10/5/2006) to display
when i specify a date range that would normally include it. I am having this
problem with a few random date records in the database.

I have even reformatted it: : Format([DateRecord],"Short Date") to ensure
that it in indeed in the correct format and even used the same formatting yet
again in the criteria to ensure it is also in the same format. Yet a few of
the records simply do not want to cooperate.

Anyone have an idea why?

Thanks
ruralguy - 01 Nov 2006 17:50 GMT
You are experiencing an ASCII Text sort.  Don't format the field, just sort
on it.

>Hi there,
>
[quoted text clipped - 27 lines]
>
>Thanks

Signature

HTH - RuralGuy (RG for short) acXP WinXP Pro
Please post back to this forum so all may benefit.

Lythandra - 01 Nov 2006 18:35 GMT
The issue was brought to my attention when there was no formatting at all in
it.

The formatting was me trying different things to get it to work correctly.

> You are experiencing an ASCII Text sort.  Don't format the field, just sort
> on it.
[quoted text clipped - 30 lines]
> >
> >Thanks
ruralguy - 01 Nov 2006 18:44 GMT
Is the field type a Date/Time data type or Text?

>The issue was brought to my attention when there was no formatting at all in
>it.
[quoted text clipped - 6 lines]
>> >
>> >Thanks

Signature

HTH - RuralGuy (RG for short) acXP WinXP Pro
Please post back to this forum so all may benefit.

Lythandra - 01 Nov 2006 18:56 GMT
Yes it is. There was no reson for it to not be working which was why I was
posting on here.

But its all moot now, I converted it all to text and made a formatting
function to do it correctly.

Thanks for trying to help.

> Is the field type a Date/Time data type or Text?
>
[quoted text clipped - 8 lines]
> >> >
> >> >Thanks
Matthias Klaey - 01 Nov 2006 19:15 GMT
>Yes it is. There was no reson for it to not be working which was why I was
>posting on here.
[quoted text clipped - 16 lines]
>> >> >
>> >> >Thanks

[...]

Trying to clarify: If [DateRecord] is a Date/Time field in your table,
you can do something like this in the query underlying the report:

SELECT Format([DateRecord],"<your preferred format>" AS DisplayDate
ORDER BY [DateRecord];

Note that the ordering is on the "pure" field, not on the formatted
field. This should give you the correct order for any format that you
wish to display.

HTH
Matthias Kläy
Signature

www.kcc.ch

Dan - 01 Nov 2006 19:35 GMT
> I am having a weird date problem and I just cannot figure out why.

- Overheard by many people as my date spoke into her cell phone.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.