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

  • SEARCH
  • Home
  • 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 8686635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T22:54:14+00:00 2026-06-12T22:54:14+00:00

I have a table in Access in a custom format saved as dd/MM/yyyy hh:mm:ss

  • 0

I have a table in Access in a custom format saved as dd/MM/yyyy hh:mm:ss tt , Also A form in VB.NET 2010, I get a specific day, month and year with no problem but the problem comes when I want to query the sum of a column named value depending on a specific month or day or year….

The table is like:

+-----+-----------+-------------------------+
| id  |     value |       date              |
+-----+-----------+-------------------------+
| id1 |      1499 | 01/01/2012 07:30:11 p.m.|
| id2 |      1509 | 11/02/2012 07:30:11 p.m.|
| id3 |      1611 | 21/10/2012 07:30:11 p.m.|
| id1 |      1115 | 11/10/2012 07:30:11 p.m.|
| id1 |      1499 | 17/05/2012 07:30:11 p.m.|
| id2 |      1709 | 11/06/2012 07:30:11 p.m.|
| id3 |      1911 | 30/07/2012 07:30:11 p.m.|
| id1 |      1015 | 01/08/2012 07:30:11 p.m.|
| id1 |      1000 | 11/05/2012 07:30:11 p.m.|
|+-----+-----------+------------------------+

So I Know the query

SELECT SUM(value) FROM mytable WHERE date in='01/05/2012 00:00:00' …

How to tell the query I want the month of May so I would get 1499+1000= 2499

Or how to tell I want the year 2012 so I would get the sum of all the table

Which would be the correct syntax…

  • 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-06-12T22:54:16+00:00Added an answer on June 12, 2026 at 10:54 pm

    It’s not standard SQL, but if you’re using Access this should always work:

     SELECT SUM([Value]) FROM Mytable WHERE Year([Date])=2012 and Month([Date])=5
    

    or this, if you just want to filter the year:

     SELECT SUM([Value]) FROM Mytable WHERE Year([Date])=2012
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a short access/mySQL question. I have a mapping table on the format
I have Access table with fields, in which there is some data and path
I Have a table in Access as below SI Number Time 1.14172E+20 13:30:35 1244066650
I have an access table which has some cells as blank ( no data
I have a table in an Access 2007 database. All fields are of type
I have a table Movies in access, connected with OleDBConnection, and Datagridview1 component. Have
I have a question about Access.If for example I have a table with the
In one of the ms-access table I work with we have a text field
I can't solve this on MS Access SQL. I have a foo table with
I have an abnormally large table for one of my applications in MS Access.

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.