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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T18:27:46+00:00 2026-05-12T18:27:46+00:00

I was just about to write this myself, but I know this has to

  • 0

I was just about to write this myself, but I know this has to exist and I’m just managing to avoid all the Google keywords that would lead me right to it.

I would be looking for something like DDDMMMYYY where D, M, Y are the number of days, months, and years. So 00103000 would indicate a span of three months and one day, or 000000001 would indicate a span of one year. Ideally this format would also have a standard way to apply it that could take into consideration all of the pitfalls of timespan calculation like varying number of days in a month, leap years, etc.

I am not looking for a way to calculate a timespan between two known timestamps, as was asked here (Calculate relative time in C#), i’m looking for something like a specific string format I can store that would indicate a span of time to be used for determining a second unknown date from a known one.

Such as, using my fictitious format above: if I said “calculate what date would be 00103000 from September 15, 2009” would return “December 16, 2009”, which is three months and one day after September 15th.

  • 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-12T18:27:46+00:00Added an answer on May 12, 2026 at 6:27 pm

    I would recommend looking at the ISO 8061 format for durations. It is not only easy to parse and apply to a given date, it is a well-known standard with a lot of resources available.

    Determining the duration from two points in time is a bit trickier, but only because without input from the application, it is unclear whether 1-March to 1-June is 3 months or 92 days. Nonetheless, the format can express either equally well as well as, for example, 0.25 years.

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

Sidebar

Related Questions

I've got an application that just shipped. Since I wrote it, I've learned about
I've gone through just about every property I can think of, but haven't found
In a C++ application that can use just about any relational database, what would
Just about every piece of example code everywhere omits error handling (because it confuses
I'm just about to make my first trip into the world of JNI (Java
I'm just about wrapped up on a project where I was using a commercial
I use log4net in just about every code project. I was wondering what other
i was just about to finish up my project and install it as a
So here I am just about to start a big project using LINQ to
I'm working on a project which is just about to start, and since I

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.