Sort
Home Up Search Trademarks how to use

For best results: this site requires that cookies be enabled for proper operation - see Legal Page for more info

 

Select Any of These

SORT BY DATE

You can sort a field of dates using the Quick Sort feature, and you'll get a chronological list. That's not the only way to sort dates, though. If you wrap your date field in a DatePart() function, the many possibilities may surprise you. For instance, the expression

=DatePart("m",[date])

in a query, where date represents your date field, returns a column of integers between 1 and 12, each representing the corresponding date's month component. To sort the records by month, you'd simply select the appropriate sort order in the Sort field.

You could use this function with any of the following codes:

yyyy returns the four-digit year
q returns the quarter (1 to 4)
m returns the month (1 to 12)
y returns the two-digit year
d returns the day as a digit (1 to 31)
w returns the day of the week as a digit (1 to 7)
ww returns the week of the year ( 1 to 52)
h returns the hour in military time
n returns the minute
s returns the second

LAST UPDATED: Thursday, 08. November 2007 18:27:52 -0600

 

Questions?

Just Check out some of our sponsors

Shop at BestPrices.Com!

web server downtime monitoring

HALO Computer Technology

COPYRIGHT 1998 - 2008 All names used are Trademarks of the respective companies

Home ] Up ]

Send mail to CompanyWebmaster  with questions or comments about this web site.
Copyright © 2007 HALO Computer Technology
Last modified: 02/14/08