Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3341652
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:44:50+00:00 2026-05-18T00:44:50+00:00

I have a pretty basic query, but I’d like it to return the results

  • 0

I have a pretty basic query, but I’d like it to return the results in order from the earliest time to the latest. The column in question is a “short time.” This is what I have right now:

SELECT *
FROM tasksetup
ORDER BY whenend ASC

What’s the proper syntax to get this to work?

As an update:
When I run this query, it works just fine in that it completes. However, the completed query is not ordered the way I’d like. It returns the results in about the same order as they are in the table, rather than ordered by whenend.

Update 2: I guess it does work. I don’t know what was different yesterday, but now its ordering just fine. Oh computer science.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T00:44:51+00:00Added an answer on May 18, 2026 at 12:44 am

    I don’t see why your query doesn’t work … unless whenend includes a date component which is not visible in your format. The Jet/ACE Date/Time data type always includes an integer component to represent the date; the fractional component represents the time of day.

    See what you get with this:

    SELECT Format(whenend, "yyyy/mm/dd hh:nn:ss") AS full_date_time
    FROM tasksetup
    ORDER BY 1 ASC
    

    Perhaps this session in the Immediate Window will help clarify Date/Time data type:

    ? Now()
    11/5/2010 2:19:54 PM 
    ? Format(Now(), "short time")
    14:20
    ? CDbl(Now())
     40487.5977546296 
    ? CDate(0)
    12:00:00 AM 
    ? Format(CDate(0), "yyyy/mm/dd hh:mm:ss")
    1899/12/30 00:00:00
    

    Update: I created a table named tasksetup with a Date/Time field named whenend with the field’s Format property set to Short Time. And I added 2 rows. Running your original query produces this result, which is apparently wrong:

    whenend
    2:00
    1:00
    

    However, the query I suggested runs without error, and reveals what is really going on:

    full_date_time
    1899/12/30 02:00:00
    2010/11/06 01:00:00
    

    You can use the TimeValue() function to ignore the date component of Date/Time values. Perhaps this query would give you the results you originally wanted.

    SELECT TimeValue(whenend) AS ignore_dates
    FROM tasksetup
    ORDER BY 1 ASC;
    
    ignore_dates
    1:00:00 AM
    2:00:00 AM
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using CF9 and have a pretty basic html cfgrid that returns results from a
I have a pretty basic problem but I can't seem to figure it out...
Pretty basic programming question, I know PHP have a function for it, but does
I realize this question is pretty basic, but I'm really stuck. I have a
okay so this seemed like it should be pretty basic but I just can't
I might have pretty basic question about regex. I have the following regex, which
I have a pretty basic challenge-based iPhone game, and I wanted to know what
I have a pretty basic doubt on dirty read/writes to a value stored in
I am new to WCF so I think this is pretty basic. I have
I have a basic permission system where I am pretty much hardcoding permissions based

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.