#1 2016-05-25 00:25:28

EGovMetrics
Member
Registered: 2016-05-21
Posts: 39

Date in Text control

Hi,
Which is the best way to insert a date in this format
YYYY MM DD HH MM
(Year Month Day Hour Minute)
into a Text control ?

Thanks
Best
Joseph Caristena

Offline

#2 2016-05-25 01:19:23

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: Date in Text control

Hello Joseph,

If I understand well, probably the best way is to use the NewDate action to create a Date variable, and then, use the DateFormat action with the created Date variable. Something like the below one:

// Get the current data as a new Date variable
NewDate "[App.Timestamp]" "" "[MyDate]"

// Format the Date variable with our desired tokens
DateFormat "[MyDate]" "YYYY MM DD HH mm" "[MyFormattedDate]"

// Set the formatted date for the input value
SetVar "[Input1.Value]" "[MyFormattedDate]" "String"

Take a look at both NewDate action's reference and DateFormat action's reference.

Offline

Board footer

Powered by FluxBB


Copyright ©2018 DecSoft. All rights reserved.