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 6322395
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:19:26+00:00 2026-05-24T16:19:26+00:00

For example, my starting day of the week is Monday (2/1/2011), when user input

  • 0

For example, my starting day of the week is Monday (2/1/2011), when user input is (4/1/2011) Wednesday, is there any built-in functions that can help me get the starting date of the current week?

Thank you.

  • 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-24T16:19:27+00:00Added an answer on May 24, 2026 at 4:19 pm

    Assuming that SQL server’s DATEFIRST setting fits in with your idea of how weeks are aligned (this probably only matters for Saturdays, Sundays, etc), then a DATEADD/DATEDIFF pair from an arbitrary Monday should give the result you want:

    select DATEADD(week,DATEDIFF(week,'20110103',CURRENT_TIMESTAMP),'20110103')
    

    Where CURRENT_TIMESTAMP obviously picks todays date. If you were selecting from a table (Tab), with a column called RandomDate, then you might do:

    select DATEADD(week,DATEDIFF(week,'20110103',RandomDate),'20110103') as MondayDate
    from Tab
    

    But I’m confused by your example, since neither the 2nd of January nor the 1st of February (usual interpretation possibilities for ‘2/1/2011’) is a Monday. The random Monday I selected was '20110103' – so if, instead, you needed to find the friday for a particular date, you’d use '20110107' in both places where '20110103' appears

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to calculate last years starting day of the current week NOW()
Is there any direct way to know the day on a specific date? For
I want to get the starting and ending dates of a week for example
I'm starting to learn Backbone with this simple example: <div id=counter>unkown</div> <button id=add-button>ADD</button> (function($){
I'm just starting with The Well-Grounded Rubyist, and they gave the following example: print
Example: I have an class that inherits from UIImageView. An object creates an instance
Ok, I'm really starting to have a bad day and the ol' brain isn't
I have a program that generates the following output: ┌───────────────────────┐ │10 day weather forecast│
Is it possible to write a SQL query that sorts data set by day
I am thinking about this all day and can't seem to figure out an

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.