Click here to Skip to main content
12,820,108 members (22,775 online)
Click here to Skip to main content

Tagged as


Posted 23 Nov 2012

why this is giving me wrong output

, 23 Nov 2012 CPOL
In the string conversion of a date, lower case mm returns the minutes. For months, you must use upper case, MM. Your format string should therefore be "MM/dd/yyyy".Happens to me, too.



Compare Revision Minor Date Status Editor
2 - publicly available No 23-Nov-12 6:12 Available Gregory Gadow
Updates in content. 78 changes had been made.
1 No 23-Nov-12 6:10 Available Gregory Gadow


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Gregory Gadow
Software Developer (Senior)
United States United States
Gregory Gadow is currently a student at Central Washington University, studying for a B.S. in Actuarial Science with plans to graduate in June, 2019. He has been writing code for almost 30 years in more than a dozen programming languages. Previously, he worked for a mid-size brokerage firm as the company's programming department doing VB6, VB.Net, ASP, HTML, XML and SQL. He also held the Series 7 and Series 66 brokerage licenses.

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170308.1 | Last Updated 23 Nov 2012
Article Copyright 2012 by Gregory Gadow
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid