← cast operator page · general/cast/time_to_string/iso_8601_intervals
pandas ✅ · DuckDB ✅
cast(Me_1, string) on a Time measure, without a mask: the default format.
Type conversion: "From time: the time value is printed using the ISO-8601 representation for generic time intervals, up to a maximum of day precision, in the form start/end."
2020-01-01/2020-06-30 and 2021-03-15/2021-03-20, with the dates in the ISO-8601 extended form YYYY-MM-DD.
DS_r := DS_1[calc Me_2 := cast(Me_1, string)];
| Id_1 | Me_1 |
|---|---|
| 1 | 2020-01-01/2020-06-30 |
| 2 | 2021-03-15/2021-03-20 |
{
"datasets": [
{
"name": "DS_1",
"DataStructure": [
{"name": "Id_1", "type": "Integer", "role": "Identifier", "nullable": false},
{"name": "Me_1", "type": "Time", "role": "Measure", "nullable": true}
]
}
]
}
| Id_1 | Me_1 | Me_2 |
|---|---|---|
| 1 | 2020-01-01/2020-06-30 | 2020-01-01/2020-06-30 |
| 2 | 2021-03-15/2021-03-20 | 2021-03-15/2021-03-20 |
{
"datasets": [
{
"name": "DS_r",
"DataStructure": [
{"name": "Id_1", "type": "Integer", "role": "Identifier"},
{"name": "Me_1", "type": "Time", "role": "Measure"},
{"name": "Me_2", "type": "String", "role": "Measure"}
]
}
]
}