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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:16:29+00:00 2026-05-12T05:16:29+00:00

Dates in DB2 AS/400 are an integer, containing the number of days since sometime

  • 0

Dates in DB2 AS/400 are an integer, containing the number of days since sometime around the turn of the 20th century.

Question 1: Does anyone know the IBM DB2/AS400 “zero” date? e.g.:

  • 12/30/1899
  • 12/31/1899
  • 1/1/1900

Question 2: Given an “AS/400” date (e.g. 40010) how can you convert that to a CLR DateTime?

DateTime d = new DateTime(40010); //invalid

Some other “zero” dates are:

  • OLE Automation: 12/30/1899
  • SQL Server: 1/1/1900
  • 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-12T05:16:29+00:00Added an answer on May 12, 2026 at 5:16 am

    Question 1:

    I have no idea what the start date is for DB2. Google isn’t very helpful anyway. Don’t you have any sample data you could use to figure it out?

    Update: are you sure the date is stored as a number of days? I found this page that suggests otherwise.

    Question 2:

    Assuming 1900-01-01 as the start date in this example, where days is the AS/400 date value.

    DateTime myDate = new DateTime(1900, 1, 1).AddDays(days);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We store our dates are stored in milliseconds since the epoch and the Olson
I have a one query explaind below...., 1.My DB2 table column is in INTEGER
my dates in my table are strings in the format: 10/12/2009 Now how would
Relative dates are great to display the temporal incidence of recent activity, but at
My dates in mysql database are setting to 1999-11-30 no matter what I enter
I have dates as a list in the following format: 09-2012,10-2012,01-2013 What will be
I store dates as String in my database, in this format: YYYY-MM-DD HH:MM and
I need to search dates in mysql however, if the column type is date
I have two dates in javascript: var first = '2012-11-21'; var second = '2012-11-03';
I have two dates: var first = '21-11-2012'; var second = '03-11-2012'; What is

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.