|
-
Nov 22nd, 2002, 12:33 PM
#1
Thread Starter
New Member
Converting a text value
I need to convert the following string into a SQL datetime data type.
"12-dec-2002 1243"
Anyone no how I can do this without splitting it up into a vbdate and vbtime. I would like to do it together.
-
Nov 22nd, 2002, 12:47 PM
#2
Let me in ..
What do you mean by splitting ?????
You can just directly format it and insert it into SQL Server field.
You can use VB's Format function or SQL's CAST and CONVERT functions. For CAST And CONVERT consult SQL help. There is SQL documentation on this. And its pretty easy.
Or use format function.
dim Temp as string
temp = "12-dec-2002 1243"
format(temp,"dd-MMM-yyyy hh:mm:ss AMPM)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|