How to extract previous Month date value from Excel

@manjusree_R_N_manju ,

Apologies again :sweat_smile:. Could you check with the below :

DT1  = DT.AsEnumerable.Where(Function(x)Not String.IsNullOrWhitespace(x("Month").ToString) andAlso CDate(x("Month").ToString).ToString("MMMyyyy") = Now.AddMonths(-1).ToString("MMMyyyy")).CopyToDatatable

Do also check with other Solutions what @Shiva_Nikhil and @pikorpa provided as I believe it does have the implementation correct.

2 Likes