Sets the end timestamp of a raster object.
Syntax
raster ST_SetEndDateTime(raster raster_obj, timestamp time);Parameters
| Parameter | Type | Description |
|---|---|---|
raster_obj | raster | The raster object whose end time you want to set. |
time | timestamp | The end time to assign to the raster. Use the yyyy-MM-dd HH:mm:ss format. Example: 2020-08-30 18:00:00. If you pass a date string without a time component (for example, '2020-01-01'), the time defaults to 00:00:00. |
Examples
The following example sets the end time of each raster in raster_table to 2020-01-01 00:00:00 and then reads it back using ST_endDateTime:
SELECT ST_endDateTime(ST_setEndDateTime(raster_obj, '2020-01-01'))
FROM raster_table;Expected output:
st_enddatetime
-------------------------
Wed Jan 01 00:00:00 2020