Welcome to SPN

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

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

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
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page