How to convert Now.Addhours(-3) to integer

I need to convert result of Now.Addhours(-3) from DateTime to integer variable, Can anyone plz suggest?

Hi,

Can you share expected output?
If hour value as integer, Now.AddHours(-3).Hour will work.

Regards,

Now.Addhours(-3) gives 12/14/2023 15:40:17. But i need result to be 15.

Hi,

Can you try the following?

Now.AddHours(-3).Hour 

Regards,

2 Likes

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