|
-
May 27th, 2005, 02:23 AM
#1
Thread Starter
New Member
how to convert date format
hello folks
i am new to vb. i have some columns in my table which are in "21-may-1998" format . But at my front end ( VB form) i pick it up thru a datepicker which is in " 6-23-1998" format . Can anybody plz tell me how to convert
"5/26/2005" to " 26-may-2005"
thanx in advance
-
May 27th, 2005, 03:08 AM
#2
Fanatic Member
Re: how to convert date format
This is a vb problem, not db.... Anyway, you probably have format options on the date picker. Look through the date pickers properties. Alternatively, you could try changing the system date format....
-
May 27th, 2005, 03:17 AM
#3
Lively Member
Re: how to convert date format
Use
Date.ToString("dd-mmm-yyyy")
Try this thing
-
May 27th, 2005, 03:23 AM
#4
Re: how to convert date format
Old VB/VBA
format(<datevariable>,"dd-mmm-yyyy") - read up on format function
.Net - no idea probably the same or what has been posted
Depending on the DB you may be able to format in the Sql statement. Just another possibility.
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
-
May 27th, 2005, 06:15 AM
#5
Re: how to convert date format
 Originally Posted by yogi4yu
hello folks
i am new to vb. i have some columns in my table which are in "21-may-1998" format . But at my front end ( VB form) i pick it up thru a datepicker which is in " 6-23-1998" format . Can anybody plz tell me how to convert
"5/26/2005" to " 26-may-2005"
thanx in advance
Really need to know the DB you are using.
First - there is not format of 21-may-1998 in a DB. That's a display format that a client tool is showing you. Dates are stored in a binary format - numerically.
So - again - what is the backend DB? What are you using for a provider to move data and is that in-line SQL statements or stored procedures.
Show some code with how the update is failing for you.
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
|