Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hello, I'm trying to format a date with no success. What I need to do is to take a date no matter how it comes in and save it to a table as YYYYMMDD. Now, I'll take even getting it to MM/DD/YYYY and then splitting it up if need be. But the issue I'm having is when someone inputs 2/24/03 for instance, doing a ToShortDateString gives me 2/24/2003. I need it 02/24/2003 so that there is padding in the MM and DD. Is there a way to format like this? In VB6 I would just tell it the format I wanted and that was it. But I can't seem to find that functionality in .NET or anything that gets me close to what I need.

 

Any good date formatting resource that Google may have missed? Many thanks.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...