Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Declare @TestDate DateTime
Set @TestDate = '23:59'
Select Convert(VarChar(10),
Case When (datepart(hour, @TestDate) % 12) = 0
Then 12
Else DatePart(hour, @TestDate) % 12
End
)
+ Case When DatePart(hour, @TestDate) < 12
Then ' AM'
Else ' PM'
End