Current Page: NeXtMidas Training Common Midas Concepts Blue Files Time Code
- - | Time Code: There are two fields in the main header of a BLUE file that are used to specify the start time of the file: `TimeCode` `XStart` (or `YStart` in a Type 2000 file) Time for a given element (`N`) in a BLUE file is equal to:
        TIME(N) = TimeCode + XStart + N*XDelta      (Type 1000,3000,5000)
        TIME(N) = TimeCode + YStart + N*YDelta      (Type 2000)
  - - There are three equally valid ways of specifying the start time of `2007:07:04::12:00:00` for a given BLUE file (substitute `YStart` for `XStart` with a Type 2000 file): Start time given in `TimeCode` field:
          TimeCode = 2007:07:04::12:00:00
          XStart   = 0
    - Start time given in `XStart` field:
          TimeCode = 0
          XStart   = 2007:07:04::12:00:00
    - Start time given as `TimeCode + XStart`:
          TimeCode = 2007:07:04::00:00:00
          XStart   = 12:00:00
      or
          TimeCode = 2007:07:04::08:30:00
          XStart   = 12600
The first of these is rather common among Midas users. The `TimeCode` is set to the start-of-day. The `XStart` is then set to the number of seconds since the start-of-day. Non-Linear Time Code: Various options are available in the Midas frameworks to handle data with non-linear Time Code. The handling of non-linear time is an advanced topic and is not included as part of this training.