How do I sort dates by year, not month?

R

rockcat

I am in the insurance industry and I use Microsoft Access 2003 to manage my
database of prospects and leads. I use a lead generation service and I
download my leads into my Access Database. I created this database in 2005.
My form displays the date-time the lead was received in this format
01/01/2006 12:06:01.
I like to sort my leads in decending order (newest-to-oldest).
Unfortunately, now that we've rolled over into a new year, I've just realized
that I'm sorting by month, then date, then year. I need to tell my system to
sort by year, month, date, so that my leads appear in the order in which I
received them. How do I do this? I do not want to change the data that I
download into my database, only the sorting method.

I am a novice with code, so please provide as much detailed instructions as
possible. Thank you very much.

rockcat
 
R

rockcat

As I said, I'm a novice. I don't have a clue how to do this. Where do I enter
this data?

Rick B said:
Just change your sort to something like...

Year([SomeDateField])



--
Rick B



rockcat said:
I am in the insurance industry and I use Microsoft Access 2003 to manage my
database of prospects and leads. I use a lead generation service and I
download my leads into my Access Database. I created this database in
2005.
My form displays the date-time the lead was received in this format
01/01/2006 12:06:01.
I like to sort my leads in decending order (newest-to-oldest).
Unfortunately, now that we've rolled over into a new year, I've just
realized
that I'm sorting by month, then date, then year. I need to tell my system
to
sort by year, month, date, so that my leads appear in the order in which I
received them. How do I do this? I do not want to change the data that I
download into my database, only the sorting method.

I am a novice with code, so please provide as much detailed instructions
as
possible. Thank you very much.

rockcat
 
R

Rick B

In the form's "ORDER BY" property would be one way of doing it. If the form
is based on a query or sql statement, you could also include your sorting
there.


--
Rick B



rockcat said:
As I said, I'm a novice. I don't have a clue how to do this. Where do I
enter
this data?

Rick B said:
Just change your sort to something like...

Year([SomeDateField])



--
Rick B



rockcat said:
I am in the insurance industry and I use Microsoft Access 2003 to manage
my
database of prospects and leads. I use a lead generation service and I
download my leads into my Access Database. I created this database in
2005.
My form displays the date-time the lead was received in this format
01/01/2006 12:06:01.
I like to sort my leads in decending order (newest-to-oldest).
Unfortunately, now that we've rolled over into a new year, I've just
realized
that I'm sorting by month, then date, then year. I need to tell my
system
to
sort by year, month, date, so that my leads appear in the order in
which I
received them. How do I do this? I do not want to change the data that
I
download into my database, only the sorting method.

I am a novice with code, so please provide as much detailed
instructions
as
possible. Thank you very much.

rockcat
 
R

rockcat

Hi Rick -- I appreciate your help, but I'm just not following you. I download
my data from the internet into a field labeled APPDATE which uses the
following format mm/dd/yyyy hh:mm:ss

When I highlight this field and click the A/Z or Z/A buttons, my data is
sorted in the order presented above. How do I get it to search as: yyyy/mm/dd
hh:mm:ss ??

Thanks again for your help.

Rick B said:
In the form's "ORDER BY" property would be one way of doing it. If the form
is based on a query or sql statement, you could also include your sorting
there.


--
Rick B



rockcat said:
As I said, I'm a novice. I don't have a clue how to do this. Where do I
enter
this data?

Rick B said:
Just change your sort to something like...

Year([SomeDateField])



--
Rick B



I am in the insurance industry and I use Microsoft Access 2003 to manage
my
database of prospects and leads. I use a lead generation service and I
download my leads into my Access Database. I created this database in
2005.
My form displays the date-time the lead was received in this format
01/01/2006 12:06:01.
I like to sort my leads in decending order (newest-to-oldest).
Unfortunately, now that we've rolled over into a new year, I've just
realized
that I'm sorting by month, then date, then year. I need to tell my
system
to
sort by year, month, date, so that my leads appear in the order in
which I
received them. How do I do this? I do not want to change the data that
I
download into my database, only the sorting method.

I am a novice with code, so please provide as much detailed
instructions
as
possible. Thank you very much.

rockcat
 
R

Rick B

Where are you doing this? You posted this in a FORMSCODING newsgroup. This
leads me to believe that you are using a FORM when you view your data. If
you are not, then my post would not apply to your question.

If you are doing this in the actual table, then DON'T. Tables are not user
interfaces. They are simply buckets where your data is stored. You can
control the format of your data and the order in which it is sorted by using
queries, forms, or reports. The order of the data in the table is
irrelevant.


--
Rick B



rockcat said:
Hi Rick -- I appreciate your help, but I'm just not following you. I
download
my data from the internet into a field labeled APPDATE which uses the
following format mm/dd/yyyy hh:mm:ss

When I highlight this field and click the A/Z or Z/A buttons, my data is
sorted in the order presented above. How do I get it to search as:
yyyy/mm/dd
hh:mm:ss ??

Thanks again for your help.

Rick B said:
In the form's "ORDER BY" property would be one way of doing it. If the
form
is based on a query or sql statement, you could also include your sorting
there.


--
Rick B



rockcat said:
As I said, I'm a novice. I don't have a clue how to do this. Where do I
enter
this data?

:

Just change your sort to something like...

Year([SomeDateField])



--
Rick B



I am in the insurance industry and I use Microsoft Access 2003 to
manage
my
database of prospects and leads. I use a lead generation service and
I
download my leads into my Access Database. I created this database
in
2005.
My form displays the date-time the lead was received in this format
01/01/2006 12:06:01.
I like to sort my leads in decending order (newest-to-oldest).
Unfortunately, now that we've rolled over into a new year, I've just
realized
that I'm sorting by month, then date, then year. I need to tell my
system
to
sort by year, month, date, so that my leads appear in the order in
which I
received them. How do I do this? I do not want to change the data
that
I
download into my database, only the sorting method.

I am a novice with code, so please provide as much detailed
instructions
as
possible. Thank you very much.

rockcat
 
R

rockcat

I AM using a FORM. I understand that I can control the format of my data and
the order in which it is sorted by using queries, forms, or reports. I just
don't know how to write the statement so that this data: "mm/dd//yyyy
hh:mm:ss" in my APPDATE field sorts in this order: "yyyy/mm/dd hh:mm:ss"

rockcat


Rick B said:
Where are you doing this? You posted this in a FORMSCODING newsgroup. This
leads me to believe that you are using a FORM when you view your data. If
you are not, then my post would not apply to your question.

If you are doing this in the actual table, then DON'T. Tables are not user
interfaces. They are simply buckets where your data is stored. You can
control the format of your data and the order in which it is sorted by using
queries, forms, or reports. The order of the data in the table is
irrelevant.


--
Rick B



rockcat said:
Hi Rick -- I appreciate your help, but I'm just not following you. I
download
my data from the internet into a field labeled APPDATE which uses the
following format mm/dd/yyyy hh:mm:ss

When I highlight this field and click the A/Z or Z/A buttons, my data is
sorted in the order presented above. How do I get it to search as:
yyyy/mm/dd
hh:mm:ss ??

Thanks again for your help.

Rick B said:
In the form's "ORDER BY" property would be one way of doing it. If the
form
is based on a query or sql statement, you could also include your sorting
there.


--
Rick B



As I said, I'm a novice. I don't have a clue how to do this. Where do I
enter
this data?

:

Just change your sort to something like...

Year([SomeDateField])



--
Rick B



I am in the insurance industry and I use Microsoft Access 2003 to
manage
my
database of prospects and leads. I use a lead generation service and
I
download my leads into my Access Database. I created this database
in
2005.
My form displays the date-time the lead was received in this format
01/01/2006 12:06:01.
I like to sort my leads in decending order (newest-to-oldest).
Unfortunately, now that we've rolled over into a new year, I've just
realized
that I'm sorting by month, then date, then year. I need to tell my
system
to
sort by year, month, date, so that my leads appear in the order in
which I
received them. How do I do this? I do not want to change the data
that
I
download into my database, only the sorting method.

I am a novice with code, so please provide as much detailed
instructions
as
possible. Thank you very much.

rockcat
 
R

rockcat

test

Rick B said:
Where are you doing this? You posted this in a FORMSCODING newsgroup. This
leads me to believe that you are using a FORM when you view your data. If
you are not, then my post would not apply to your question.

If you are doing this in the actual table, then DON'T. Tables are not user
interfaces. They are simply buckets where your data is stored. You can
control the format of your data and the order in which it is sorted by using
queries, forms, or reports. The order of the data in the table is
irrelevant.


--
Rick B



rockcat said:
Hi Rick -- I appreciate your help, but I'm just not following you. I
download
my data from the internet into a field labeled APPDATE which uses the
following format mm/dd/yyyy hh:mm:ss

When I highlight this field and click the A/Z or Z/A buttons, my data is
sorted in the order presented above. How do I get it to search as:
yyyy/mm/dd
hh:mm:ss ??

Thanks again for your help.

Rick B said:
In the form's "ORDER BY" property would be one way of doing it. If the
form
is based on a query or sql statement, you could also include your sorting
there.


--
Rick B



As I said, I'm a novice. I don't have a clue how to do this. Where do I
enter
this data?

:

Just change your sort to something like...

Year([SomeDateField])



--
Rick B



I am in the insurance industry and I use Microsoft Access 2003 to
manage
my
database of prospects and leads. I use a lead generation service and
I
download my leads into my Access Database. I created this database
in
2005.
My form displays the date-time the lead was received in this format
01/01/2006 12:06:01.
I like to sort my leads in decending order (newest-to-oldest).
Unfortunately, now that we've rolled over into a new year, I've just
realized
that I'm sorting by month, then date, then year. I need to tell my
system
to
sort by year, month, date, so that my leads appear in the order in
which I
received them. How do I do this? I do not want to change the data
that
I
download into my database, only the sorting method.

I am a novice with code, so please provide as much detailed
instructions
as
possible. Thank you very much.

rockcat
 
R

rockcat

I AM using a FORM. I understand that I can control the format of my data and
the order in which it is sorted by using queries, forms, or reports. I just
don't know how to write the statement so that this data: "mm/dd//yyyy
hh:mm:ss" in my APPDATE field sorts in this order: "yyyy/mm/dd hh:mm:ss"

rockcat



Rick B said:
Where are you doing this? You posted this in a FORMSCODING newsgroup. This
leads me to believe that you are using a FORM when you view your data. If
you are not, then my post would not apply to your question.

If you are doing this in the actual table, then DON'T. Tables are not user
interfaces. They are simply buckets where your data is stored. You can
control the format of your data and the order in which it is sorted by using
queries, forms, or reports. The order of the data in the table is
irrelevant.


--
Rick B



rockcat said:
Hi Rick -- I appreciate your help, but I'm just not following you. I
download
my data from the internet into a field labeled APPDATE which uses the
following format mm/dd/yyyy hh:mm:ss

When I highlight this field and click the A/Z or Z/A buttons, my data is
sorted in the order presented above. How do I get it to search as:
yyyy/mm/dd
hh:mm:ss ??

Thanks again for your help.

Rick B said:
In the form's "ORDER BY" property would be one way of doing it. If the
form
is based on a query or sql statement, you could also include your sorting
there.


--
Rick B



As I said, I'm a novice. I don't have a clue how to do this. Where do I
enter
this data?

:

Just change your sort to something like...

Year([SomeDateField])



--
Rick B



I am in the insurance industry and I use Microsoft Access 2003 to
manage
my
database of prospects and leads. I use a lead generation service and
I
download my leads into my Access Database. I created this database
in
2005.
My form displays the date-time the lead was received in this format
01/01/2006 12:06:01.
I like to sort my leads in decending order (newest-to-oldest).
Unfortunately, now that we've rolled over into a new year, I've just
realized
that I'm sorting by month, then date, then year. I need to tell my
system
to
sort by year, month, date, so that my leads appear in the order in
which I
received them. How do I do this? I do not want to change the data
that
I
download into my database, only the sorting method.

I am a novice with code, so please provide as much detailed
instructions
as
possible. Thank you very much.

rockcat
 
J

John Vinson

Hi Rick -- I appreciate your help, but I'm just not following you. I download
my data from the internet into a field labeled APPDATE which uses the
following format mm/dd/yyyy hh:mm:ss

When I highlight this field and click the A/Z or Z/A buttons, my data is
sorted in the order presented above. How do I get it to search as: yyyy/mm/dd
hh:mm:ss ??

Is this APPDATE field a Date/Time field (which will sort
chronologically) or a Text field (which will indeed sort
alphabetically, as you describe)? If you can't change it to a
Date/Time field (preferable!), you can sort by CDate([APPDATE]).

John W. Vinson[MVP]
 
R

rockcat

It is a Date/Time field, but it sorts by month first, so January 2005 and
January 2006 data are mixed together. Please tell me the EXACT statement that
I need to put in the Control Source? box, so that it will sort by YEAR. Thank
you.

John Vinson said:
Hi Rick -- I appreciate your help, but I'm just not following you. I download
my data from the internet into a field labeled APPDATE which uses the
following format mm/dd/yyyy hh:mm:ss

When I highlight this field and click the A/Z or Z/A buttons, my data is
sorted in the order presented above. How do I get it to search as: yyyy/mm/dd
hh:mm:ss ??

Is this APPDATE field a Date/Time field (which will sort
chronologically) or a Text field (which will indeed sort
alphabetically, as you describe)? If you can't change it to a
Date/Time field (preferable!), you can sort by CDate([APPDATE]).

John W. Vinson[MVP]
 
R

rockcat

OOOPS! My bad. It was set as a text field. I changed it to a date/time field
and that solved my problem. Thanks for bringing the problem to light.

Paul

John Vinson said:
Hi Rick -- I appreciate your help, but I'm just not following you. I download
my data from the internet into a field labeled APPDATE which uses the
following format mm/dd/yyyy hh:mm:ss

When I highlight this field and click the A/Z or Z/A buttons, my data is
sorted in the order presented above. How do I get it to search as: yyyy/mm/dd
hh:mm:ss ??

Is this APPDATE field a Date/Time field (which will sort
chronologically) or a Text field (which will indeed sort
alphabetically, as you describe)? If you can't change it to a
Date/Time field (preferable!), you can sort by CDate([APPDATE]).

John W. Vinson[MVP]
 
J

John Vinson

OOOPS! My bad. It was set as a text field. I changed it to a date/time field
and that solved my problem. Thanks for bringing the problem to light.

Easy to do, especially when you're importing data!

And I'm glad this was the solution because I was starting to worry!

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top