Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27554

Simple Date formatting issue

$
0
0
I have a button that takes the date in a text box and adds 7 days
Code:

AirDate.Text = Format(datAir.AddDays(7).ToString, "Short Date")
it works however it will format it in this 12/1/2013 where i want 12/01/2013 this is because later on I use a sort and when I do that it puts 12/17/2013 before 12/2/2013.... Which is not in order...... I tried
AirDate.Text = Format(datAir.AddDays(7).ToString, "mm/dd/yyyy") But obvoiusly it did not work.

Viewing all articles
Browse latest Browse all 27554

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>