GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Microsoft  >  VB.NET
Go To First  |  Previous Question  |  Next Question 
 VB.NET  |  Question 52 of 60    Print  
VB.NET Date conversion
how to convert mm/dd/yyyy to dd/mm/yyyy.


  
Total Answers and Comments: 3 Last Update: September 26, 2008     Asked by: vineeladudhekula 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: ItsSanju
 
Its better to retrieve the System date format first and system date seperator.

On the basis of that retrieve the vales of Day, Month and year.

Now you are having everything related to date.

You can generte any type of formated date.

I am using this and satisfied.

Regards,
Sanjay

Above answer was rated as good by the following members:
sed0424
May 05, 2008 11:22:38   #1  
brajendra_mishra Member Since: May 2008   Contribution: 1    

RE: VB.NET Date conversion
DateTimePicker1.Format DateTimePickerFormat.Custom
DateTimePicker1.CustomFormat "MM-dd-yyyy"
DateTimePicker1.Text Now
MsgBox(DateTimePicker1.Text)
DateTimePicker1.CustomFormat "dd-MM-yyyy"
'DateTimePicker1.Text Now
MsgBox(DateTimePicker1.Text)


Try this

 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 2Overall Rating: -2    
August 21, 2008 09:38:29   #2  
pradhib.l Member Since: August 2008   Contribution: 5    

RE: VB.NET Date conversion
By using format function suppose your regional settings is (system date is the format of mm/dd/yyy)
Dim s1 As String
s1 System.DateTime.Today.Date ''//format of sys date mm/dd/yyyy
s1 Format(CDate(s1) dd /MM/ yyyy )
MsgBox(s1)
i think it is useful.

 
Is this answer useful? Yes | No
September 26, 2008 08:23:27   #3  
ItsSanju Member Since: September 2008   Contribution: 1    

RE: VB.NET Date conversion
Its better to retrieve the System date format first and system date seperator.

On the basis of that retrieve the vales of Day Month and year.

Now you are having everything related to date.

You can generte any type of formated date.

I am using this and satisfied.

Regards
Sanjay

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape