AllExperts > Experts 
Search      

Active X Programming

Volunteer
Answers to thousands of questions
 Home · More Questions · Answer Library  · Encyclopedia ·
More Active X Programming Answers
Question Library

Ask a question about Active X Programming
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About David Oldfield
Expertise
I can answer all questions related to Client / Server or COM application development with Visual Basic or JAVA. I can usually answer the questions about Visual C++ development of the same, however, I avoid them, as they are quite time consuming, and usually developers who use C++ know what they are doing.

Experience

Past/Present clients
Please review my homepage at http://resume.utopiaconcept.com, and use the scroller to view some of the clients I have worked with.

 
   

You are here:  Experts > Computing/Technology > Basic > Active X Programming > Microsoft Visual Basic

Topic: Active X Programming



Expert: David Oldfield
Date: 2/25/2002
Subject: Microsoft Visual Basic

Question
Hi,


This is John from South India.

I got an interesting Question for You.Can you suggest me about How to change Date/Time format settings in Control Panel using VB.

The reason for this question is I tried to insert a record in MS-SQL Server thru' VB.But I face a regular problem of invalid Date format/ even data inserted in a different format,even after I use FORMAT(DATE,"dd-mm-yy").

Hope I will get an interesting reply on this about How to change Date/ Time Formats in Control Panel thru' VB.

Regards,

John .D. Prabhakar

Answer
I believe any (or all) of these functions should work, debending on what version of vb you are using...

formatDateTime(intNamedFormat, date())
cDate(date()) ' This one will convert in expression to a date... which will be compatable w/ sql
format("mm/dd/yyyy")
dateFormat(intNamedFormat, date())

try these... if you are using asp... I believe you can only use formatDatetime... but I always have to test... and so will you :(... sorry bout that much... but one or any of these should work for you...

good luck my friend!
Dave

Add to this Answer    Ask a Question



  Rate this Answer
   Was this answer helpful?
Not at allDefinitely              
   12345  

     
About Us | Advertise on This Site | User Agreement | Privacy Policy | Help
Copyright  © 2008 About, Inc. About and About.com are registered trademarks of About, Inc. The About logo is a trademark of About, Inc. All rights reserved.