Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Sorting Format Date Function in MS Access

Discussion in 'Information Technology' started by sherwinb, Jul 28, 2006.

  1. sherwinb

    sherwinb
    Expand Collapse
    Guest

    I haved the following expression in MS Access query based on a date field:
    Format([Form Date],"mmm yy"). In this query I am doing a group by function
    to count up the number of times that a field exists within a particluar
    month. Basically I want to aggregate up the values for a particular month
    and year.

    My problem is that when I order the query by the expression Format([Form
    Date],"mmm yy"), the results are not in chronological order. I wanted to
    stay away from creating 2 extra columns for a Year and Month field based on
    the date. Is there any way to get Format([Form Date],"mmm yy") to sort as a
    true date function based on a serial number?

    Thanks
     
  2. Loading...

    Similar Threads Forum Date
    India Indian ‘Journalist’ Slams Gurbaksh Singh Than Admits to Receiving Information from ‘Agencies’ Breaking News Dec 27, 2013
    Opinion West Punjab : Information Pool and Pictures Punjab, Punjabi, Punjabiyat Nov 18, 2013
    When Turban Turns Messenger Diaspora Finds Interesting Ways to Spread Information About Sikhi Sikh Youth Nov 10, 2013
    Story of Transformation Sikh Rehat Maryada Jul 27, 2012
    Sikhism Benti Chaupai - Keertan Format Videos Feb 11, 2012

  3. KARL DEWEY

    KARL DEWEY
    Expand Collapse
    Guest

    Add a field to the left of your Format([Form Date],"mmm yy") like
    Format([Form Date],"yyyymm") and sort on it.

    "sherwinb" wrote:

    > I haved the following expression in MS Access query based on a date field:
    > Format([Form Date],"mmm yy"). In this query I am doing a group by function
    > to count up the number of times that a field exists within a particluar
    > month. Basically I want to aggregate up the values for a particular month
    > and year.
    >
    > My problem is that when I order the query by the expression Format([Form
    > Date],"mmm yy"), the results are not in chronological order. I wanted to
    > stay away from creating 2 extra columns for a Year and Month field based on
    > the date. Is there any way to get Format([Form Date],"mmm yy") to sort as a
    > true date function based on a serial number?
    >
    > Thanks
     

Share This Page