+ Reply to Thread
Results 1 to 2 of 2

Thread: time format string

  1. #1
    Junior Member
    Join Date
    Jan 2012
    Posts
    13

    time format string

    Hello , i want to display time as 3:20 AM instead of 03:20 AM , i tried that method , but still displaying 03:20 AM
    Code:
    String.Format("{0:t}", data.PgTime)
    Thanks in advance for your help .

  2. #2
    Junior Member
    Join Date
    Jan 2012
    Posts
    1
    Hi , t << stands for "short time pattern" , you can simply use that code :
    Code:
    string text = date.ToString("h:mm tt");
    That will display 3:20 AM

+ Reply to Thread

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts