DateTime
-
Hi, I want to show date format in VS.Net C# default control like this Day-Month-Year Hours:Minutes AM|PM i set the control property on custom and add this text to custom format like this dd-MM-yyyy HH:mm AM/PM but is show values like this 20-05-2006 6:25 A.5/P.5. Please tell me how i solve this problem. thanks |Muhamad Waqas Butt| waqasb4all@yahoo.com www.sktech.freewebspace.com
-
Hi, I want to show date format in VS.Net C# default control like this Day-Month-Year Hours:Minutes AM|PM i set the control property on custom and add this text to custom format like this dd-MM-yyyy HH:mm AM/PM but is show values like this 20-05-2006 6:25 A.5/P.5. Please tell me how i solve this problem. thanks |Muhamad Waqas Butt| waqasb4all@yahoo.com www.sktech.freewebspace.com
Well, as far as I know, a time with the format HH:mm will give you time in 24-hour format, like 20:05 for example for 08:05 PM. It looks like the M of AM and PM is mistakenly perceived as the M of month. Try putting hh:mm and see what happens. That's all i can think of from the information you gave. Talal "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." --Rich Cook
-
Hi, I want to show date format in VS.Net C# default control like this Day-Month-Year Hours:Minutes AM|PM i set the control property on custom and add this text to custom format like this dd-MM-yyyy HH:mm AM/PM but is show values like this 20-05-2006 6:25 A.5/P.5. Please tell me how i solve this problem. thanks |Muhamad Waqas Butt| waqasb4all@yahoo.com www.sktech.freewebspace.com
dd-MM-yyyy hh:mm tt
For more info about custom date/time format strings take a look at here[^].
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
-
Well, as far as I know, a time with the format HH:mm will give you time in 24-hour format, like 20:05 for example for 08:05 PM. It looks like the M of AM and PM is mistakenly perceived as the M of month. Try putting hh:mm and see what happens. That's all i can think of from the information you gave. Talal "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." --Rich Cook
datetime.Tostring (a , b) ; a and b change output string to mm-dd-yy hh:mm:ss and ....