There is a way to store the values before and after 12:00 in Now, but is there a function to directly determine if it is AM or PM?
The below c # code is used to get the AM or PM of the current time.
Can you try the following condition?
True : AM
False : PM
Please make use of the below code as in the inline screenshots.
Datetime.Now.ToString(“tt”) - this will simply return the value whether AM or PM.
Hope this will help you. Thank you.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.