Asp.Net Time Format 12-Hour With AM/PM

In Time  Format
Label1.Text = DateTime.Today.ToString(“hh:mm tt”);

Sql server Only Select Time

SELECT REPLACE(REPLACE(RIGHT(‘0’+LTRIM(RIGHT(CONVERT(varchar,getDate(),100),7)),7),’AM’,’ AM’),’PM’,’ PM’)as Date


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s