Questions tagged [datetime]

datetime refers to a string that contains a date part and a time part, in that order. Typically it refers to a date and time encoded according to the International Organization for Standardization (ISO) 8601 standard: Data elements and interchange formats -- Information interchange -- Representation of dates and times.

Filter by
Sorted by
Tagged with
2 votes
1 answer
37 views

Enable a time field in Model Builder

Does anyone know how to enable a time field in the ModelBuilder of ArcGIS Pro? I am attempting to create a model that takes a newly created feature class and runs "Group By Proximity", which ...
  • 33
2 votes
0 answers
41 views

Detecting break point in Sentinel-2 time series [closed]

I am trying to create a simple method for wildfire detection using Sentinel-2 time series via GEE. The method is based on the decrease of the Normalized Burned Area (NBR) Index when a fire occurs. So ...
  • 900
2 votes
2 answers
52 views

How to generate sequential date field by year?

Looked at several similar questions but cannot find solution. I'm working with some mosaic rasters that need a date fields added to them for a time dimension, but I don't want to do it manually. I've ...
0 votes
2 answers
56 views

Converting antiquated string date values to datetime values in ArcGIS Pro [closed]

I am trying to modernize an existing parcel data set that stores date information as strings in the following format: "YYYY MMM DD" 12/13/2022 would be stored as "2022 DEC 13." Is ...
2 votes
1 answer
211 views

Creating animated line moving between points in QGIS

I have a point file, with Date:Time enabled. Rather than just animate the cycling through of points, I would like to have a line moving in a straight direction from one point to another in date order. ...
5 votes
1 answer
186 views

Changing timezone of features attribute

When adding a feature I am adding a Datetime field to the layer (its of type memory layer). I set up the widget to also add the timezone: But: when adding a feature it does not let me change the ...
  • 30.3k
1 vote
1 answer
56 views

Translate Date Time CEST CET (OSM timestamp) in to CET YYYY-MM-dd (QGIS)

I need the date in YYYY-MM-DD (CET) from an OSM timestamp with mixed (CEST/CET) dates. The time is not necessary. Finally, I just want to show all records that are 7 days old (as expression to filter ...
  • 7,985
1 vote
1 answer
31 views

QGIS TimeManager returning zero records

I am using QGIS 3.26 and TimeManager 3.6 and have imported a GPX file with ~10000 times in a qDateTime field called "time". Viewing the label and attribute table show these appear to be ...
  • 121
2 votes
1 answer
129 views

ArcGIS Pro 3 Create year, month and day columns

Based on the sample data column below, what tool I can use in ArcGIS Pro 3 to create the Year, Month and Day columns in the attribute table? The purpose is to then use these columns to create a space ...
-2 votes
1 answer
55 views

Time difference between two string fields with microsecond (or seconds) resolution using, Arcpy, datatime and UpdateCursor

I am trying to calculate (using Arcpy) the time difference between two fields that are in string data type and they have the following time format "YYY-MM-DD HH:mm:SS.sss" I have achieved ...
1 vote
1 answer
35 views

Get specific rasters (with date string in rasternames) from FGDB in to the list

I have a FGDB with many rasters. The raster name contains date at the end(YYYYMMDD). See example rasters bellow. I can get all rasters in to the list with wildcard. That is not the issue. I want to ...
  • 91
1 vote
1 answer
262 views

Earth Engine: how to access the dates from a list retrieved from an image collection

I have implemented the answer of Noel Gorelick to the question: Earth Engine get dates from imageCollection It is the following code: var dates = s1_collection_f .map(function(image) { ...
3 votes
1 answer
225 views

Changing appearence of DateTime input in QGIS Processing tool to international datetime format

I am writing a processing tool for QGIS where I use a QgsProcessingParameterDateTime as input. By default it displays the input in a not understandable format (dd.MM.yy HH:mm). To keep this input ...
  • 30.3k
8 votes
0 answers
92 views

Exporting Geopackage converts milliseconds of QDateTime to zero

I use this solution to display actual QDateTime value with milliseconds in a temporary memory layer. And I use another solution to export as CSV the value including the millisecond value. But then, I ...
2 votes
1 answer
995 views

Date label on a Sentinel-2 image collection (Google Earth Engine)

I found a way to add text to the images of a collection using a package that GEE user Gena created for this purpose. I used this code as guide, in the addText function I used the property system:...
4 votes
1 answer
3k views

Exporting layer with datetime field with milliseconds value

I have a layer with datetime field with milliseconds. I use the following script to get a QDateTime object and add it to a memory layer: layer = QgsVectorLayer("Point?crs=EPSG:4326", "...
6 votes
1 answer
3k views

Displaying milliseconds in Attribute Table using PyQGIS

I have a datetime string with microsecond. I use the following script to get a QDateTime object and add it to a memory layer: layer = QgsVectorLayer("Point?crs=EPSG:4326", "test", &...
2 votes
0 answers
139 views

Auto update date-time in QGIS

In QGIS 3.10 I need something to auto update a datetime attribute. I need it to update only when any other attribute is updated. I have tried the following: Steps: Add a Edited Date Field (ESRI uses ...
  • 21
0 votes
0 answers
104 views

ArcGIS API for JavaScript 4.23 : Cannot use SQL CAST function with layer.definitionExpression but it work fine with query builder

I'm working with features which needs to be filtered. I need to use the definition expression : https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#definition... ...
  • 71
1 vote
1 answer
114 views

Check if one date before or after another date in Google Earth Engine

How do I check if one date is before or after another date using the Google Earth Engine Python API? In other words, I want to compare two dates like datetime object in Python. import ee firstDate=ee....
  • 191
2 votes
0 answers
138 views

QGIS 3.16 Use change state of a checkbox as a trigger for updating another field

I want to record the date/time of field survey for features. This should only be updated at the moment a checkbox value is ticked. Further edits would be needed to the record later, either in the ...
2 votes
1 answer
102 views

Date operation in the Query Builder withPostGIS layer

I would like to filter a PostGIS layer by a datetime (QDateTime) field. I only want to show elements newer then 14 days. I tried the following expression in the Quary Builder: (day(now() - "...
  • 23
0 votes
1 answer
199 views

How to filter two time periods in a year?

Well, if I want filter to two time periods in a year. Just like 1989-01-01~1989-04-01 and 1989-10-01~1990-01-01.It is about the time series analysis. There is part of my code, something not shows ...
0 votes
0 answers
66 views

How to convert UTC in LMT with field calculator in QGIS?

I have GPS data in shape format in QGIS. But in my attribute table only the UTC time is given in the form of 01.01.2022 05:00. Is it possible to add a new column with the field calculator where I can ...
  • 39
7 votes
3 answers
378 views

Selecting latest record by date

At 3.22.1 I have a GeoPackage attribute table containing the string field: box_id and the date field: inspection_date. The table rows look like: box_id         inspection_date NE_01_01    2021-05-01 ...
  • 7,443
0 votes
1 answer
146 views

SQL expression ArcPy date format

I'm trying to use definitionquery to keep entities where date is smaller or equal to a certain date ( variable entered by the user). The Variable and the field in the table are formatted as dates. ...
  • 37
0 votes
1 answer
68 views

ArcPy select analysis date field > date variable

I am sure this is probably a simple syntax fix but I receive invalid syntax errors during the Select Analysis when trying to select records where the date field in my file geodb (ISS_CST) is greater ...
  • 489
3 votes
3 answers
444 views

Removing the time zone from datetime field in QGIS

How can I get rid of the time zone in the date/time field? So I have a GeoPackage with the following data: and want to get just 2021-06-07 16:25:40
3 votes
1 answer
63 views

QGIS attributes table shows wrong data when printing Timestamp with Milliseconds

I'm using QGIS to Debug Geometries and corresponding times. For that, I created GeoJSON in C# and added 3 timestamps as attributes: feature.Properties.Add("CreatedUTC", CreatedUTC.ToString(&...
0 votes
2 answers
547 views

Customizing DateTime field in ArcPy data management feature

I have a table in SQL with one column TIMESTAMP which shows the date/time in the following format. 2019-05-31 08:09:20.000 In order to process the data in ArcGIS, I created a new table in ArcGIS. To ...
  • 67
1 vote
0 answers
171 views

Datetime in ArcGIS Pro defaults to 12/30/1899

I have datetime field in a CSV with the following format: Time 2007-02-01 05:00:00+00:00 When I use the append tool in ArcGIS Pro to load data to a table on a SQL Server Enterprise geodatabase, ...
3 votes
1 answer
6k views

Parsing/converting ISO 8601 datetime fields using pandas

I have a datetime field in a Pandas dataframe that becomes problematic when using ArcGIS Pro to load data from a csv to a table on ArcSDE. The field in Pandas looks like this: 2007-02-01T05:00:00....
4 votes
3 answers
333 views

Capturing Date using Date and Time from Expression builder

I have a string that includes date and time like in this format: '23/02/2021 09:03', '24/02/2021 09:10' etc. I would like to use Rule based filtering to colour symbols that has date=23/02/2021. So ...
  • 175
2 votes
1 answer
489 views

Convert time in float format to time format

I have a shapefile line layer with an attribute for time in float format. This is what 23.21 and 55 seconds looks like: 232155.17 This is 03.27 and 01 seconds: 32701.64 I would like to convert this ...
1 vote
1 answer
305 views

ArcPy Select by attribute using create date

I'm writting a Python script that will look for newly created features and update them. This script will be automated to run every day at the end of the day. I'm using the Select by attribute tool to ...
  • 335
0 votes
1 answer
341 views

Converting excel integer date format to datetime using QGIS

How to convert Microsoft Excel date format to datetime format using QGIS? In example: 43089 in MS Excel is 2017-12-20.
  • 6,570
1 vote
1 answer
94 views

Calculating datetime difference using ArcPy [closed]

How would I calculate the time difference between two fields? For Example: 3/22/2018 7:08:00 AM - 3/22/2018 7:07:30 AM
  • 21
1 vote
1 answer
252 views

ArcPy - Get Date as parameter value and calculate Date field

In my ArcPy script I have an input parameter for the Date, so the user is asked to input a date value (time is not needed) using the data type GPDate. In the script I calculate a new field, field data ...
0 votes
1 answer
240 views

Separating date and time from the same column into two columns

If I have date and time in the same column how can I separate them in two columns in ArcMap? And how can I put the date in this format (year,month,day)?
  • 1
1 vote
1 answer
180 views

Updating datefield from a string with UpdateCursor

I have a string I'm slicing and then using UpdateCursor to update rows with the outputs. The string is formatted like this: Foo_YYYYmmddHM_Xy_Ab_Bar I'm struggling in getting only the YYYYmmdd part of ...
  • 403
1 vote
1 answer
476 views

Error when trying to add system:time_start when using reduceRegions in Google Earth Engine

I am reducing an image collection into a feature collection by using a function to map the reduceRegions function to each image in a collection. I'm trying to make sure the system:time_start property ...
5 votes
2 answers
2k views

Converting string column to datetime column in QGIS

I have an attribute column that has a string datetime and I want to convert that to a date column. I first attempted to simply add the time column in an expression, and I only got the year/month/date, ...
  • 91
0 votes
1 answer
380 views

GeoPandas dataframe from PostGIS table having date column

I have this PostgreSQL PostGIS database and I want to read this data in GeoPandas. I am able to create the GeoPandas database when I exclude the columns having dates/datetime #Reading data from ...
3 votes
1 answer
87 views

Changing the time of a map label in QGIS using python

I would like to adjust the "[% format_date( now(),'dd/MM/yyyy HH:mm:ss') %]", as it currently displays 07/12/2020 13:31:40 on the map, as I am in the UK right now. However, I would like to ...
  • 193
1 vote
1 answer
99 views

Convert the time to the suitable format using Pandas [closed]

I have a file whose name is "MCD43A3_Alb_QA_SWIR_2020_061.tif", and I want to split the time "2020_061" and convert to the format "2020-03-01", how can I do that? Here is ...
  • 51
1 vote
1 answer
96 views

Selecting features by year in datetime field

I have a shapefile with a datetime field. I want to split the features by year and save into a geodatabase. My approach has been to create a list of years, and from there iterate over the list and ...
  • 403
1 vote
1 answer
335 views

Calculating dates and using arcpy.CalculateField_management(

I am in the process of converting my scripts from python 2.7 to 3.x I am trying to calculate a date field with a datetime object exactScriptTime = datetime.datetime.now() exactScriptTime = ...
  • 2,124
2 votes
1 answer
2k views

Setting Date and Time for QDateEdit and QTimeEdit

Working on a QGIS plugin, I am struggling to save/load date and time values. Users can enter dates via QDateEdit widget and times via QTimeEdit widget. Values are then stored the following: s = ...
  • 30.3k
2 votes
0 answers
72 views

Time zone problem on a calculated field

I have configured a date/time field with the default value "now ()" on a shapefile. When I create an object in QGIS, the datetime is correct. In QField, there is a 2 hour lag. However, the ...
  • 21
0 votes
1 answer
318 views

Can't create fields of type Time on shapefile layers [duplicate]

I wanted to create new field in QGIS to store date and time from a datetime string field named dateposte. Here is the code I used to make it: import datetime layers = QgsProject.instance().mapLayers(...
  • 245