cancel
Showing results for 
Search instead for 
Did you mean: 

How to calculate text dates ?

PatrykLiberski
Level 4

Hello, is it possible to calculate text dates? Or to remove just the rest of my text?

I need to calculate days of leave. I have two data items and I must substract one from another. For example 11/3/2017 12:00:00 AM - 3/31/2017 12:00:00 AM. How can I do this? So far I've tried Replace function. I wanted to use Mid, Trim and Left but the characters in my date items are going to change. so sometimes I will have 9 characters (11/3/2017) and sometimes 8 (1/3/2017).

Which function could I use ?



------------------------------
Patryk
------------------------------
10 REPLIES 10

Yes - it is over-complicated as I said. I would treat this solution as temporary and for example create later code stage like David suggested to make it more elegant and effective. 

Best regards,
Michal

------------------------------
Michal Szumski
RPA developer
Rockwell Automation
Europe/Warsaw
------------------------------