PC Review


Reply
Thread Tools Rate Thread

convert date to string ?

 
 
harshad taylor
Guest
Posts: n/a
 
      12th May 2004
hi all. i am a fairly new user of vb .net. i need to know how to convert
the date (possibly to a string maybe)that a user chooses from a
"datetime picker" and take that value into a variable and pass it to an
sql query. it might be something very simple but i dont have a clue.

thanks.



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      12th May 2004
* harshad taylor <(E-Mail Removed)> scripsit:
> hi all. i am a fairly new user of vb .net. i need to know how to convert
> the date (possibly to a string maybe)that a user chooses from a
> "datetime picker" and take that value into a variable and pass it to an
> sql query. it might be something very simple but i dont have a clue.


Have a look at its 'ToString' method.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
 
Reply With Quote
 
Armin Zingler
Guest
Posts: n/a
 
      12th May 2004
"harshad taylor" <(E-Mail Removed)> schrieb
> hi all. i am a fairly new user of vb .net. i need to know how to
> convert the date (possibly to a string maybe)that a user chooses from
> a "datetime picker" and take that value into a variable and pass it
> to an sql query. it might be something very simple but i dont have a
> clue.


Have a look at the SQLCommand.Parameters property. If you use it, you won't
need to convert the value on your own.


--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert Date string to date format Joe M. Microsoft Excel Misc 7 6th May 2010 02:46 PM
VBA convert day and date from text string to Excel date Max Bialystock Microsoft Excel Programming 5 14th May 2007 04:54 AM
How to convert a date string to datetime value with custom date format? ABC Microsoft C# .NET 1 29th Sep 2005 11:11 AM
How to convert user-defined custom format date string to date value abcabcabc Microsoft VB .NET 1 19th Aug 2005 12:31 PM
Convert a string containing a 32-bit binary date to a date data type Remi Caron Microsoft C# .NET 2 22nd Sep 2004 06:23 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:44 AM.