Transformations: Clarify behaviour of Date format (#42436) (#42466)

* Transformations: Clarify behaviour of `Date format`

* Remove full stop from bullet point

(cherry picked from commit 5eb35606b9)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
This commit is contained in:
Grot (@grafanabot) 2021-11-29 12:10:14 -05:00 committed by GitHub
parent dead7e1a1f
commit 70dfe4f942
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -347,10 +347,10 @@ This transformation changes the field type of the specified field.
- **Numeric -** attempts to make the values numbers
- **String -** will make the values strings
- **Time -** attempts to parse the values as time
- Will show an option to specify a DateFormat as input by a string like yyyy-mm-dd or DD MM YYYY hh:mm:ss
- Will show an option to specify a DateFormat for the input field like yyyy-mm-dd or DD MM YYYY hh:mm:ss
- **Boolean -** will make the values booleans
For example the following query could be modified by selecting the time field, as Time, and Date Format as YYYY.
For example the following query could be modified by selecting the time field, as Time, and Input format as YYYY.
| Time | Mark | Value |
| ---------- | ----- | ----- |

View File

@ -113,7 +113,10 @@ export const ConvertFieldTypeTransformerEditor: React.FC<TransformerUIProps<Conv
/>
</InlineField>
{c.destinationType === FieldType.time && (
<InlineField label={'Date Format'}>
<InlineField
label="Input format"
tooltip="Specify the format of the input field so Grafana can parse the date string correctly."
>
<Input value={c.dateFormat} placeholder={'e.g. YYYY-MM-DD'} onChange={onInputFormat(idx)} width={24} />
</InlineField>
)}