sysdate+ x hours for a variable
Hello, I have a variable in the flow, which needs to have sysdate as Start date/time and sysdate + X(read the value from database/previous variables) for end date/time.
TimePeriod = 6 (represents 6 hours)
StartDate = systemDate (06/26/2017 10:00; in this format)
EndDate = StartDate + TimePeriod (result should be 06/26/2017 16:00)
All in CST timezone.
Thanks in advance.
We do have date operations to format dates so you just have to append the information to the variable. you may want to give a try and let us know if that works for you.
Hello, I tried
Base(Content pack)> Library> Utility Operations>Date and Time.
The issues I'm running into, with "Date Parser":
format I used:
en, unix, dd/MM/yyyy HH:mm
format I need(24 hr format):
java.lang.IllegalArgumentException: Illegal pattern character 'e';
Is there a way to define the format I want, using the get and offset d&t itself?
In java, this format, in 24hr, I believe:
String DateToStr = DateFormat.getInstance().format(curDate); System.out.println(DateToStr);
You can use the Offset operation to increase with 6 hours and Date parser to parse it according to the needs. just remove en. unix.
Screenshot below: got current date, increased with 1 hour and formatted to the desire format.
Hope it helps