Is it possible to convert date to OA date format?

is it possible to convert date to OA date format ?

because I want to compare my date to all the dates in excel, so when I read Range date column, it gives me all the OA dates, so if conversion of date to OA date is possible then it would be easy for me to simply convert my date into OA date and compare them.

1 Like

Hi @samir,
refer this link

Hi Samir,

Try this system.DateTime.FromOADate

I hope this helps

Regards
Srish

hey @srishsai

Thanks buddy,
but what if I want to convert my date into OA date format,
because it would be easy for me to convert only my date and compare it to all the date I have from the excel (in OA date format)

Dear @samir,

try this one
system.DateTime.Now.ToOADate

I hope this solves

Try this one:
system.DateTime.Today.ToOADate.ToString

1 Like

hey, yeah it works… but instead of now i used Today to get OA date for date(05/02/2019).

Thanks,
Regards
Samir.

1 Like

yes!! got it. Thanks for the reply. :slightly_smiling_face:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.