Is there any way to get the AM or PM time in the morning or afternoon?

@Kirigirisu_Coin

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.

DateTime AM 1


DateTime AM 3

Hope this will help you. Thank you.

5 Likes