ashishmani
(ashish mani tripathi)
September 13, 2021, 12:37pm
1
from a given string
Gibson, Kayla P 72292 08/17/2006 12/30/14 [116945] Kayla Gibson $0.00 CLOSED
12/30/14 [116950] Kayla Gibson $0.00 CLOSED
01/30/16 [223009] Blake Gibson $0.00 CLOSED
09/03/21 [2637975] Kayla Gibson $213.60 OPEN; United HealthCare UHC
$213.60 09/03/21 [99203] - OFFICE EVALUATION AND
i have to find 09/03/21 this date in same format
arivu96
(Arivazhagan A)
September 13, 2021, 12:44pm
2
Hi @ashishmani ,
try below code, will give true or false.
strtext.Contains("09/03/21 ")
Regards,
Arivu
ashishmani
(ashish mani tripathi)
September 13, 2021, 12:45pm
3
this date comes multiple times, I have to count that also
arivu96
(Arivazhagan A)
September 13, 2021, 12:48pm
4
Then use regex pattern to check the count of the date.
09\/03\/21
use is match activity.
from the output match.count will provide the count of the date.
Regards,
Arivu
arivu96
(Arivazhagan A)
September 13, 2021, 12:55pm
6
Use below pattern
[0-9]{2}\/[0-9]{2}\/[0-9]{2}
Regards,
Arivu
ashishmani
(ashish mani tripathi)
September 13, 2021, 12:57pm
7
can to tell me how to use pattern,
Srini84
(Srinivas)
September 13, 2021, 1:12pm
8
@ashishmani
Use Assign activity and write as below
strDateValue = System.Text.RegularExpressions.Regex.Match(“Date”,“[0-9]{2}/[0-9]{2}/[0-9]{2}” ).Value
Hope this may help you
Thanks
ashishmani
(ashish mani tripathi)
September 13, 2021, 1:17pm
9
I have to search date from a string, the string variable is strDT
the date variable is, collectDate
from a give string i have to find date
Srini84
(Srinivas)
September 13, 2021, 1:22pm
10
@ashishmani
Then write your expression as below
collectDate = System.Text.RegularExpressions.Regex.Match(strDT,“[0-9]{2}/[0-9]{2}/[0-9]{2}” ).Value
ppr
(Peter Preuss)
September 13, 2021, 1:24pm
11
ashishmani:
Gibson, Kayla P 72292 08/17/2006 12/30/14 [116945] Kayla Gibson $0.00 CLOSED
12/30/14 [116950] Kayla Gibson $0.00 CLOSED
01/30/16 [223009] Blake Gibson $0.00 CLOSED
09/03/21 [2637975] Kayla Gibson $213.60 OPEN; United HealthCare UHC
$213.60 09/03/21 [99203] - OFFICE EVALUATION AND
i have to find 09/03/21 this date in same format
lets assume following
collectDate is string var with value: 09/03/21 - strDate
Regex pattern: (\d{2}\/){2}\d{2}
- strPattern
Assign activity:
DateCount | DataType: Int32 =
System.Text.RegularExpressions.Regex.Matches(YourStringVar, strPattern).Cast(Of Match).Where(Function (x) x.toString.Equals(strDate)).Count
arivu96
(Arivazhagan A)
September 13, 2021, 1:26pm
12
DateMatchCount.xaml
(9.0 KB)
change below 2 things
Convert.ToString((now-DateTime.ParseExact(LastSuccessFinishedSyncTIME, "dd-MM-yyyy HH:mm:ss",System.Globalization.CultureInfo.InvariantCulture)).TotalHours)
LastSuccessFinishedSyncTIME ="13-09-2021 12:40:00"
Regards,
Arivu
ashishmani
(ashish mani tripathi)
September 13, 2021, 1:27pm
13
sorry, but still you do not get my problem,
I have a variable where some date is the store example :09/03/21 ,
the variable is collectDate
i Have a text, from this text i have to find collectDate with how many times i get same date, so i want counter also
ashishmani
(ashish mani tripathi)
September 13, 2021, 1:33pm
14
your project is not supported in my bot, can you show me the screenshot
ppr
(Peter Preuss)
September 13, 2021, 1:49pm
16
find starter help here:
ppr_RegexDemo.xaml (4.4 KB)