dd-dd/MM/yyyy date type problem

hi guys, I wanna get check-in and check-out date. But check-in date only day and and could not do it. For instance 23-27/11/2020 I have to get two data 23/11/2020 and 27/11/2020 How can I do it ? Thank you.

Hi @murat.karasoy

I would you the following steps:

  1. Split on the β€œ-”, you will have 2 strings, one with the number, one with the date

  2. Assign to the first string the following: String[1] + Right(String[2], 8)

This will concat your first number to β€œ/11/2020”

You know what happens when the dates are in two different months?

1 Like

@murat.karasoy
can be done with the help of Regex:
grafik

Pattern: (\d{2})-(\d{2})/(\d{2})/(\d{4})

Parts can be retrieved by refering to the different groups:
grafik

For working with Regex have a look here:

2 Likes

Hello Murat,
In this video I do a lot of stuff with String and DateTime:

0:35 Examples for Substring functions
4:10 IndexOf and LastIndexOf
5:00 SubString working together IndexOf and LastIndexOf
6:45 Split string by character
8:50 Split string by string
12:00 Lower Case and Upper Case
12:45 Trim
15:05 Compare strings in multiple ways
19:05 Resume of all the String function part
20:05 DateTime to string in multiple ways
23:00 AddDays get DayofWeek
25:40 Convert from String to DateTime
26:20 Compare DateTime

Thanks,
Cristian Negulescu