Skip to main content
Nintex Community Menu Bar

I have a component workflow that is receiving dates as a string variable.

The dates are supplied from another web service that is only exporting text strings.

The dates are formatted 'yyyy-mm-dd'

I want to convert this to a date variable in NWC.

I have a variable txtFromDate (text) and dateFromDate (datetime).

I tried set a variable action but the variable types are not supported.

 

Any ideas on this?

Hello @Gavin-Adams , 



 



at the moment, this is not possible in standard -



Please have a look at our roadmap, we will implement this feature this quarter.



 



https://community.nintex.com/t5/Roadmap/Nintex-Product-Roadmaps/ba-p/94755



 




Any update on this? As per today (27-May-2022) I cannot seem to find anything that supports this nor see it anywhere anymore in the roadmap.

I'm needing to do the same.  Any update on the implementation of this?



 



 


Hi everyone,



 



thanks for the patience, we will check with the product managers and get back to you soon.



 



regards



 



Sven


OK @Gavin-Adams and @anissa_divincen .



Here is the most ugly workaround you've probably ever seen. More just for the fun of it. I just couldn't cope with 'no' for an answer 😉



A component workflow that transfers any format of a date into a date var. Hope it works for you.



Here is an export key for the component workflow (valid until June 13): QWjRqAHSScRdnLhWZcVd4GLgWzERnDM5JuWpy51ghvzi5LmfG



If you need another export key, drop a reply and I'll provide it.



 



The format input par is by default (if empty) yyyymmdd



But you might also specify anything else that has yyyy, mm and dd strings in it. Such as dd-mm-yyyy or mm/dd/yyyy.



 



No warranty on this little exercise. Check the workflow yourself before using it for real. I actually do not recommend using it, Nintex should come with a real solution.



But really... it is 2022 and we're talking 'global leaders' in software... That we still have to do this - even for the fun of it - is a bit of a shame, isn't it? 


Thank you so much, that workflow is exactly what I needed.  At least until they build this into NWC.  Amazed they haven't already. It works perfectly!


Hi,



the export key doen't work any more. Could you please send a new one, because i have to solve the same problem.



Thanks.


Hi @EhlertS ,



Here is a new export key: QWuqEh5xFKWxmRhVSuFTNPGdEQNFmRQoGAy9ugfkrUhCcUZEz


It's a roundabout way - but it works - many thanks 🙂

Hi, 



 



Can you publish a new export key? Thank you.


The NWC toolkit has an action (Convert String to Proper) 



that will do this conversion.



 



https://community.nintex.com/t5/Blog/NWC-Toolkit/ba-p/213241


@alexviera that is good to hear. I'll try the toolkit.



Just in case,  here is the export key: Qsgj5mxy3P9fjXQUiPpcFsNhM25U3gF4nDu3ezuMSANQcZBb8


Sorry, it was expired 😉 One more time please.


jtjcojq3X7U2d872ot7Upn4MSciDuvHR3x1muXWpZyjgrzxbk at your service.

As @alexviera already noted: please use the NWC Toolkit instead. Easier, better, quicker.



Link to the NWC Toolkit page.


Just tested the NWC Toolkit: all works fine... except... for the date formatter.! Also the NWC Toolkit DateFormatter is an action to convert a date into a string but not the other way around: a string into a date. And that's what we're looking for.



So, I guess you're all back to my (clumsy but workable) solution for now. See also comments on : https://community.nintex.com/t5/Blog/NWC-Toolkit/ba-p/213241



I'll post an update soon with a more simple DIY step by step.



 


Here is a special post on how to DIY convert a date in text to a date variable.


Ok, maybe I'm missing something. If you take a string date "7/10/2022" and want to convert it to a datetime you call Convert String to Proper, isn't that what you are trying to do?



 



 


Well done @alexviera ! Kudo well deserved.



The documentation of the toolkit is so brief that I overlooked it. Probably also not realizing the proper meaning of  the word "to Proper". 😉



Took me a while to figure out that the result variable has to be defined as a date variable within the NWC Toolkit section (and not as a workflow variable):



Secondly, the input string has to be in the right format: in my case mm/dd/yyyy. Probably my regional settings. Otherwise it results in this error:





But if that is not an issue: Yep, it works.


Reply