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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:45:49+00:00 2026-06-04T12:45:49+00:00

I am storing two dates start/end date incremented by weeks, so for example I

  • 0

I am storing two dates start/end date incremented by weeks, so for example I would have a start date of 05/31/2012 which would end four weeks later on 06/28/2012.

What I need to figure out is the “current week” for any given day. I would like to output as the week number and not a date. So if today were 06/08/2012 and my start/end date were 05/31/2012, the “current week” would be 2.

  • 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-04T12:45:50+00:00Added an answer on June 4, 2026 at 12:45 pm

    I think you want to use the dateDiff() function. Basically, you can drop your first date and second date in and count the difference in weeks.

    // Here's the function
    dateDiff("datepart", "date1", "date2")
    
    // Here are your datepart options
    yyyy: Years
    q: Quarters
    m: Months
    y: Days of year (same as d)
    d: Days
    w: Weekdays (same as ww)
    ww: Weeks
    h: Hours
    n: Minutes
    s: Seconds
    
    // Here's your code:
    StartOfMonth = "05/31/2012"; // date part 1 // pseudocode
    Now = now(); // date part 2
    WeeksDifference = DateDiff("ww", StartOfMonth, Now);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two instances of NSDate (a start time and an end time) and
I would like to have a function which get start_day and end_day as two
I have two models in my Django application, for the purposes of storing search
I have two string variables which are both file paths. The code that worked
I have two times, a start and a stop time, in the format of
I have a data result that I want to filter by two different dates.
So I basically have two textboxes in the aspx file which get populated by
I have two webmethods returning dates from a .net 3.5 page. Each return a
I've two routes, 1) creating sub-tables for each user and storing his individual content
In my app, I'm storing Bitmap data in a two-dimensional integer array ( int[,]

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.