Skip to main content

Hi Everyone,

I'm having trouble extracting the proper value of a date I converted. First the user will log an event and it has a Start Time (UTC) and End Time (UTC). I also have a Calculated Value control that will convert it to different timezone which is Cluj, Romania and Manila, Philippines timezone. +8 for Philippines and +2 for Romania. 

formatDate(dateAddHours(Start Time (UTC), 😎,"MM/dd/yyyy hh🇲🇲ss tt")

formatDate(dateAddHours(End Time (UTC), 😎,"MM/dd/yyyy hh🇲🇲ss tt")

formatDate(dateAddHours(Start Time (UTC), 2),"MM/dd/yyyy hh🇲🇲ss tt")

formatDate(dateAddHours(End Time (UTC), 2),"MM/dd/yyyy hh🇲🇲ss tt")

when I open the event the calculations are correct.

Now here's my problem I have this workflow that is working fine. I just recycle it and change the variables so that I can get the values in the field of the needed dates. when I email it to myself here is the output.

200987_pastedImage_2.png

the form is working fine and I will just get the specific date. But still I'm getting those wrong values.

I attached the workflow and form just in case you want to check.

Thank you in advance!

Hi Rogelio,

For a first pass it looks like your table is using the same time for the start and end dates and it doesn't matter what your start time and end time in UTC is.

I had a look at your form and those date calculations look OK (assuming all of your users use mm/dd/yyyy format).  I also note you're not binding those calcluated values back to a SharePoint list somewhere which is one way of saving these values.

For the workflow you're running a query list action but when I import, it doesn't say what you are actually trying to query.  Is that also the same list that you're setting your variables from?  My guess without seeing the list is that something is wrong with either the query list action (check all your filters in that action) or something is wrong with setting the workflow variables which also uses a list lookup.

If you can't spot the issue with that list (or lists) then flick through a copy of the list structure, hopefully with some data and we'll be able to find it.

Cheers,

Chris


Hi Chris,

I'm new to nintex workflow and forms. So how can I bind those calculated values to a sharepoint list and how can I get those values?  

Also this is a screenshot of my query list

The value of the StartDate1 is today and the EndDate1 is set for a 5 days range using Calculate Date action.

and these are the columns in my list.

Thank you in advance!


Hi Rogelio,

You can bind/connect the results of a calculated value to a column of a compatible type by either double clicking on the calculated value and changing the connected to value or a quicker way is from the form itself:

I think this will work for you but I wanted to get a little more information because I note you're using a site workflow to achieve this and there's an associated list (the Test Project Calendar list).  Could you explain what requirement you are trying to address because there might be an easier way to achieve it.

Cheers,

Chris


Hi Chris,

I don't know why it shows you "not connected" in the field Connected to. But I already did that. is there any other way in the workflow to compute for the values? Because last time I checked it the formatDate() inline function is not working.

Thank you!

Jun


Also, the requirements is just that. The user will input a start date and end date then. the workflow will send a notification that has 3 dates in the content which is the UTC, Cluj and Manila time.


Hi Rogelio, do you need to save the user's date requests?  If so I'd suggest running the workflow from the list that stores their requests.  If you don't need to save their requests you could run something like a site workflow with start variables (start date and end date).  Then use the calculate date function to calculate your dates.  Something like this - no query list required.

Set up your variables:

Use the site workflow to calculate dates:

Calculate date example:

Email example:

Starting the workflow.  If you want to run this from a list, you can do the same thing, except have the start date and end date on the list and use those instead of the starting variables.

Cheers,

Chris


Hi Chris,

What if I need to convert many entries like all the scheduled maintenance from Monday to Friday. will this still work?


Hi Chris,

I just tried it and it worked. Thank you so much!

Cheers,

Rogelio


Hi Rogelio,

I'm glad it helped out!

For multiple entries, yes you can certainly do this.  I'd have each "entry" listed in a separate list and then use your site workflow to go through that list.  We had a mission posted last month that asked us to do something similar.  Here's a link to my response - you should be able to use bits from that answer in your solution.

Cheers,

Chris


Reply