I am trying to extract a date from excel data but it returns time with zeros like this 1/20/2022 00:00:00 how to remove zero
using assign activity for below expression but getting error
Currentrow(“Payroll_Date”) = Currentrow(“Payroll Date”).ToString.SubString(0,10).ToString.Trim
@Sam_H Convert to this format and then compare
Currentrow(“Payroll Date”).ToString.split(" "c)(0).Trim
i’m not comparing just extracting it from excel
Okay then just use this only: DateTime.ParseExact(Currentrow(“Payroll_Date”).ToString,“M/d/yyyy”, CultureInfo.InvariantCulture).ToString(“MM/dd/yyyy”)
Or you can also use
Try this, If your want to See your Datetime value as string as same as like your Excel sheet
For each row - get row item / assign - CurrentRow(0).ToString should work.
If not, kindly put a write line to see the value and post it here.
Just re enter the expression in the assign activity
In windows legacy, it seems double quote is normalized and any double quote char acer is accepted. However, at this time, in windows (.net6) ,in fact, only
" (0x22) is accepted to express string literal. To make matter worse, it seems to occur only compiling. (Expression validator don’t raise an alert.)
Currentrow("Payroll_Date") = Currentrow("Payroll Date").ToString.SubString(0,10).ToString.Trim
@Gokul001 Getting this Error now
Try Like this
Currentrow("Payroll_Date") = CDate(Currentrow("Payroll Date").ToString).Tostring("dd/MM/yyyy")
can you please check this out i have tried this as well
LOG.xlsx (10.0 KB)
TestFlow.xaml (10.8 KB)
Can you tell what do we need to do ?
Share the output also
i have to extract the date and compare it to some other excel sheet
What data you need to extract?
i have to extract date based on this i have to open excel file which is saved in some other folder
Check out the XAML file
TestFlow.xaml (16.8 KB)
LOG.xlsx (9.6 KB)
I have to extract the only date which is available in logfile and show it in MSGBOx