i have a excel in that excel one coloumn belongs to date… so times im getting the date format with OA date and some times iam getting the normal format i.e; 06/26/2023 … if iam getting the normal format i have to pick up the lastest date or if iam getting the OA format i have to change into the OA format
You can try this
If(DateTime.TryParse("inputdateastring",New DateTime),Cdate("inputdateasstring"),Datetime.FromOADate(CDBL("DateAsString")))
cheers
not getting bro
Not getting will not help…tell what is going wrong and what you tried with some screenshots and more info
cheers
in that log message that is latest date in the OA format … some times i get that in nomal US date format"06/23/2023" in this format
That is the reason I gave you a if condition to check what it is and then use cdate or oadate as per the conditional check, you did not even use it
cheers
what is the “inputasstring” meaning and “Dateasstring” meaning
this is to use in a loop when retreiving data from datatable and not as is
this is how you can use…if you want to only use in activities soemwhere then use the value part or like in log message…if you need to update the values in the datatable then use like assign
cheers
can we connect
You could inside a for each row assign each row to a datetime parse expression and your excel datable would have all columns with same date format.