Siemens Industry Online Support
Siemens AG
Entry type: FAQ Entry ID: 19105935, Entry date: 11/04/2005

What is the modified Julian date and how do you calculate it with STEP 7 V5.x?

  • Entry
  • Associated product(s)
The modified Julian date starts 17.11.1858 at 0:00 a.m. UTC and specifies the number of days since that time. With the attached program an S7-300/S7-400 can calculate this date as a floating-point value.

The Julian date is a decimal, sequential numbering of the date. The advantage of this format is the improved calculability of time periods between two points in time which lie far apart (astronomy). The Julian date is coupled with the coordinated world time (UTC) so that for international production the time of manufacture of a part can be given independent of the time zones (automotive industry, for example).
Unlike the Julian date, the day in the Modified Julian Date (MJD) does not change at 12:00 GMT UTC, but at 0:00 GMT UTC. Furthermore, the MJD is a smaller clearer number (MJD = JD - 2,400,000.5).

Descriptions of the Julian Date and Modified Julian Date are available in the internet.


  1. Download and unpack the STEP 7 project (download) "STEP_7_Julianischer_Kalender_PROJ.zip".
  2. At the input "diff_UTC" of FC1 you parameterize the current difference between local time and UTC.
  3. Download the program to your S7-300/S7-400 controller.
  4. Transfer the time from the PG/PC to the CPU of your S7 controller if it is not up to date.
  5. The calculated Julian Date is at the output "mod_jul_date" of FC1. You can see this parameter in a tag table in the "floating-point" format.

The attached download includes the archived STEP 7 V5.5 project including the German and English comments. Copy the "STEP_7_Julianischer_Kalender_PROJ.zip" file into a separate folder and then start the file with a double-click. The STEP 7 project is now unpacked with all the associated subdirectories. You can then use STEP 7 V5.5 to open and process the extracted project.

 Registration required 19105935_STEP_7_Julianischer_Kalender_PROJ.zip (36.6 KB)


  • The difference to UTC is specified in the TIME data type. In Germany, for example, it is plus two hours during the summer time (Central European Summer Time (CEST)) and plus one hour during the winter time (Central European Time (CET)).
  • The very large floating-point number gives a resolution of approx. 5 minutes. Since only 6 figures are displayed of the floating-point values in the tag table a resolution of approx. 15 minutes is visible here.

Creation Environment
The download in this FAQ was created with STEP 7 V5.5 SP3.

Security information
In order to protect technical infrastructures, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art IT security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about cyber security, please visit