GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

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

No best answer available. Please pick the good answer available or submit your answer.
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 1Overall Rating: -1    
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 | No


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape