Purchase Solution

Normal Date to Julian Date

Not what you're looking for?

Ask Custom Question

I need help doing this, I have attached a sample output:

Write a Visual Basic function named Julian which will compute the number of days which have elapsed since January 1, 4713 BC.

Here is an algorithm to compute the Julian date given the month, day, and year expressed as integers:

If the year is negative, add 1 to it.

If the month is past February, add 1 to the month; otherwise, add 13 to the month and subtract 1 from the year.

Then compute

Dim lngJulDate As Long = Math.Floor(365.25 * intYear) + Math.Floor(30.6001 * intMonth) + intDay + 1720995.0

If the date was before October 15, 1582, return this value.

Otherwise, perform the following correction:

Dim intAdjustment As Integer = (0.01 * intYear)
lngJulDate = lngJulDate + 2 - intAdjustment + 0.25 * intAdjustment

Write a program which uses this function to convert a date into its corresponding Julian date.

A convenient test case is October 9, 1995 which is Julian date 2,450,000.

Purchase this Solution

Solution Summary

Convert Normal Date to Julian Date

Purchase this Solution


Free BrainMass Quizzes
C# variables and classes

This quiz contains questions about C# classes and variables.

Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

C++ Operators

This quiz tests a student's knowledge about C++ operators.

Javscript Basics

Quiz on basics of javascript programming language.

Basic Networking Questions

This quiz consists of some basic networking questions.