Timestamp: Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
mNo edit summary
 
(29 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{stub}}
A Timestamp is a way of representing a date and time. The way this date and time is formatted can vary per project, per data source and per region in the world. Therefore, the {{software}} provides a means to configure and manage the way dates and times are interpreted for user supplied data.
A timestamp is a standardized methode for describing an exact date and time. It is a count of milliseconds from midnight januari 1st, 1970, UTC. This point in time is known as the epoch.


In the {{software}}, when a timestamp is stored as an attribute, it is stored as a '''double''' (decimal value) but interpreted as a '''long''' (integer value).
The Timestamp format used in your project can be changed in in the Project Detail panel. This format will be used to interpret timestamps present in time-values CSV data, used for example by an [[Inlet q (Water Overlay)|Inlet Q]]'s dynamic range in the Water Overlay Wizard.
[[File:Project_timestamp_format.png|300px|thumb|left]]<br style="clear:both">


[[Category:unit]]
==Timestamp format==
This format does require a certain symbology. In short we will describe it here. More details can be found at [https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html#patterns java's DateTimeFormatter patterns].
 
===Symbols===
{| {{STDT}}
! Symbol
! Meaning
! Examples
|-
|y
|year
|2004; 04
|-
|M
|month of year
|7; 07; Jul; July; J
|-
|d
|day of month
|10; 31; 4;
|-
|H
|hour of day (0-23)
|0; 4; 13; 23
|-
|m
|minute of hour
| 0, 31, 47, 60
|-
|s
|second of minute
| 55,12, 6
|}
 
===Example formats===
Example of Timestamp Formats are:
* yyyy-MM-dd
* MM-dd-hh-mm
* dd/MM/yy hh:mm:ss
* yyyy/MM/dd hh:mm:ss
* MM dd yyyy hh
Here the letters indicate the way the numbers are automatically interpreted by the Date parser used in the {{software}}. It is important that when you start importing CSV data with timestamps, you should first check what Timestamp formats are in the file and adjust the project's timestamp format to that format.
 
When you don't configure it correctly, you might receive errors of unrecognized timestamp formats, or worse, import the dates wrongly without any notice.
 
 
 
<ul>
<li style = "display:inline-block">[[File:inlet_csv.png|250xpx]]</li>
<li style = "display:inline-block">[[File:inlet_csv_xls.png|250xpx]]</li>
Example for a csv file for inlets with timestamps using the dd/MM/yyyy HH:mm:ss date format
</ul>
 
==Important Notes==
* minutes are with a small m and Months are with a capital '''M'''!
* seconds are with a small s. A large '''S''' is a fraction of second (milliseconds)!
* day of month is with a small d. A large '''D''' is a day of year!
 
==See also==
[[File:YoutubeLogo1.jpg|thumb|left|link=https://youtu.be/GnTkziMUyIU|Import and export of large [[CSV]] datasets containing timestamps (Dutch only)]]

Latest revision as of 11:12, 25 March 2021

A Timestamp is a way of representing a date and time. The way this date and time is formatted can vary per project, per data source and per region in the world. Therefore, the Tygron Platform provides a means to configure and manage the way dates and times are interpreted for user supplied data.

The Timestamp format used in your project can be changed in in the Project Detail panel. This format will be used to interpret timestamps present in time-values CSV data, used for example by an Inlet Q's dynamic range in the Water Overlay Wizard.

Project timestamp format.png


Timestamp format

This format does require a certain symbology. In short we will describe it here. More details can be found at java's DateTimeFormatter patterns.

Symbols

Symbol Meaning Examples
y year 2004; 04
M month of year 7; 07; Jul; July; J
d day of month 10; 31; 4;
H hour of day (0-23) 0; 4; 13; 23
m minute of hour 0, 31, 47, 60
s second of minute 55,12, 6

Example formats

Example of Timestamp Formats are:

  • yyyy-MM-dd
  • MM-dd-hh-mm
  • dd/MM/yy hh:mm:ss
  • yyyy/MM/dd hh:mm:ss
  • MM dd yyyy hh

Here the letters indicate the way the numbers are automatically interpreted by the Date parser used in the Tygron Platform. It is important that when you start importing CSV data with timestamps, you should first check what Timestamp formats are in the file and adjust the project's timestamp format to that format.

When you don't configure it correctly, you might receive errors of unrecognized timestamp formats, or worse, import the dates wrongly without any notice.


  • Inlet csv.png
  • Inlet csv xls.png
  • Example for a csv file for inlets with timestamps using the dd/MM/yyyy HH:mm:ss date format

Important Notes

  • minutes are with a small m and Months are with a capital M!
  • seconds are with a small s. A large S is a fraction of second (milliseconds)!
  • day of month is with a small d. A large D is a day of year!

See also

Import and export of large CSV datasets containing timestamps (Dutch only)