UrbanPro
true

Learn Advanced VBScript from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Excel

Punit Kumar
13/04/2017 0 0

The 1900 Date System

In the 1900 date system, the first day that is supported is January 1, 1900. When you enter a date, the date is converted into a serial number that represents the number of elapsed days since January 1, 1900. For example, if you enter July 5, 1998, Excel converts the date to the serial number 35981.

By default, Microsoft Excel for Windows uses the 1900 date system. The 1900 date system enables better compatibility between Excel and other spreadsheet programs, such as Lotus 1-2-3, that are designed to run under MS-DOS or Microsoft Windows.

The 1904 Date System

In the 1904 date system, the first day that is supported is January 1, 1904. When you enter a date, the date is converted into a serial number that represents the number of elapsed days since January 1, 1904. For example, if you enter July 5, 1998, Excel converts the date to the serial number 34519.

By default, Microsoft Excel for the Macintosh uses the 1904 date system. Because of the design of early Macintosh computers, dates before January 1, 1904 were not supported. This design was intended to prevent problems related to the fact that 1900 was not a leap year. If you switch to the 1900 date system, Excel for the Macintosh does support dates as early as January 1, 1900.

The Difference Between the Date Systems

Because the two date systems use different starting days, the same date is represented by different serial numbers in each date system. For example, July 5, 1998 can have two different serial numbers, as follows.


Serial number
Date system of July 5, 1998
----------------------------------

1900 date system 35981
1904 date system 34519

The difference between the two date systems is 1,462 days; that is, the serial number of a date in the 1900 Date System is always 1,462 days bigger than the serial number of the same date in the 1904 date system. 1,462 days is equal to four years and one day (including one leap day).

 

How to handle through VBA

Dim lngRow as long 

If this workbook.Date1904 = True Then

For lngRow = 2 To sheet("sheet1").Cells(Rows.Count, 1).End(xlUp).Row

if isdate(sheet("Sheet1")) then

   sheet("sheet1").Cells(lngRow, iCol).Value = sheet("sheet1").Cells(lngRow, iCol).Value + 1462

end if 


Next lngRow

End if 

 

0 Dislike
Follow 1

Please Enter a comment

Submit

Other Lessons for You

VBA Function -
Using FORMAT Function in VBA we can modify the format of Numbers, Dates, Times & String. Syntax: FORMAT(expression, format, , ) 1. Formatting "Numbers" using FORMAT function in VBA SUB Format_Numbers() MsgBox...

Arrange and View Multiple Worksheets at Once in Excel
Arrange and View Multiple Worksheets at Once in Excel This feature allows you to view multiple worksheets at once from the same workbook at the same time. You need to follow beneath simple...

Formula to Populate Weekdays of a Given Month
If you want to populate weekdays (Monday to Friday) in a range, follow below steps. Step1: In Cell A1 write any month 1st date. Let’s say 02/01/2017 (Feb 1st 2017) Step2: In Cell C1 write this...

Formula to Populate Weekdays of a Given Month
If you want to populate weekdays (Monday to Friday) in a range, follow below steps. Step1: In Cell A1 write any month 1st date. Let’s say 02/01/2017 (Feb 1st 2017) Step2: In Cell C1 write this...

Compiler vs Interpreter
Compiler Interpreter Convert all the code into binary format and execute. Convert one statement at a time and execute, then Convert next statement and execute. After conversion, source...

Looking for Advanced VBScript Training?

Learn from Best Tutors on UrbanPro.

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for Advanced VBScript Classes?

The best tutors for Advanced VBScript Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Advanced VBScript with the Best Tutors

The best Tutors for Advanced VBScript Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more