Home > Forum > General > Format date on the fly

Format date on the fly
0

MVP

Hello community!

I’d like to pick your brain about something that has been bothering me for the last hour. :) Does anyone have a solution for this?

User enters the date in the date picker field (AttDateTime) and hits TAB:
- if the value is 8 digits, then SET(AttDateTime) = CONCAT(using values from AttDateTime)
- if the value is 6 digits, then SET(AttDateTime) = CONCAT(using values from AttDateTime)
- else do nothing

I can't seem to find a way to do that. Is it even possible?

Thank you,
Martin

MVP
In reply to: Konrad Wojtycza

Hi Martin,
Could you please describe what is the business requirement, that you are trying to fulfill?

Regards,
Konrad Wojtycza
Implementation Specialist
WEBCON

Hi Konrad,

The request is to speed up the data entry. When the user has to manually insert 4 different dates in one single workflow, each reduced key stroke helps. I found a workaround using a text field, hiding by default the date picker and showing it after the text is entered in the text field (and at the same time hiding the text field). I just thought it would be easier to implement directly in the date picker field.

Best regards,
Martin

WEBCON
In reply to: Martin Meze (Freelancer)

Hi Konrad,

The request is to speed up the data entry. When the user has to manually insert 4 different dates in one single workflow, each reduced key stroke helps. I found a workaround using a text field, hiding by default the date picker and showing it after the text is entered in the text field (and at the same time hiding the text field). I just thought it would be easier to implement directly in the date picker field.

Best regards,
Martin

Hi Martin,
Form rule that may be useful here is SET FOCUS.
Let's say we would have 2 Date and time fields - Date 1, Date 2.
If you will use SET FOCUS form rule [Date 2] on change of Date 1 field, if user fulfills Date 1 in correct format
and hits enter, cursor will be automatically moved to Date 2.

To format dates, person may use FORMAT DATE or TEXT TO DATE form rules, however it looks like it is impossible using these standard form rules to format date of Date and time field which acts on itself.

Regards,
Konrad Wojtycza