Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB8.0
how to make it in visual basic 6.0 or Visual studio 2010
(input number and get month and day )
Posted 16-Jan-12 6:56am
gmornob317
Comments
SAKryukov at 16-Jan-12 12:45pm
   
VB6 or VS 2010? How is that?
--SA
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Try:
Dim dt As New DateTime(2001, 1, 1)
dt = dt.AddDays(145)
Console.WriteLine(dt.ToString("M"))
You probably want to use the current year, and you probably want to do some error checking.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

You can use TryParse() method to convert string to date and time
 
DateTime.TryParse(string,out DateTime)
Check the link below
 
http://msdn.microsoft.com/en-us/library/ch92fbc1.aspx[^]
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 6,569
1 Sergey Alexandrovich Kryukov 6,168
2 DamithSL 5,228
3 Manas Bhardwaj 4,717
4 Maciej Los 4,150


Advertise | Privacy | Mobile
Web02 | 2.8.1411022.1 | Last Updated 17 Jan 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100