Aligns a given timestamp to a specific duration or milliseconds value, considering the UTC value of the timestamp.
How does it work in the search window?
Select Create column in the search window toolbar, then select the Period operation.
This operation needs two arguments. The values you add in the Duration argument can be duration (integer number plus d for days, h for hours, m for minutes, s for seconds) or integer to represent milliseconds.
|Duration (mandatory)||duration / integer|
The data type of the new column values is timestamp.
demo.ecommerce.data table, we want to align the dates in our eventdate column to their millisecond values. Our current timezone is GMT+1.
The arguments needed to create the new column are:
Date - eventdate column
Duration - Click the pencil icon and enter 1000
Click Create column and you will see the following result:
How does it work in LINQ?
Use the operator
as... and add the operation syntax to create the new column. These are the valid formats for the Period operation:
You can copy the following LINQ script and try the above example on the
from demo.ecommerce.data select period(eventdate, 1s) as eventdate_period