473,397 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

changing string format

Hi All,

How to convert the 1st format of string to 2nd one in vb.net

1st(datetype string) : "2/12/2008 6:00:00 PM"
2nd(datatype string): "2008-2-12T17:00:00"

note: in 2nd string ,the T is just a alpahbet

Thanks,
Deepak
Feb 11 '08 #1
6 1396
sorry the 2nd is

2nd(datatype string): "2008-2-12T16:00:00"

Kindly reply me asap.
- Deepak
"deepak" wrote:
Hi All,

How to convert the 1st format of string to 2nd one in vb.net

1st(datetype string) : "2/12/2008 6:00:00 PM"
2nd(datatype string): "2008-2-12T17:00:00"

note: in 2nd string ,the T is just a alpahbet

Thanks,
Deepak
Feb 11 '08 #2
sorry the 2nd is

2nd(datatype string): "2008-2-12T18:00:00"

Kindly reply me asap.
- Deepak

"deepak" wrote:
sorry the 2nd is

2nd(datatype string): "2008-2-12T16:00:00"

Kindly reply me asap.
- Deepak
"deepak" wrote:
Hi All,

How to convert the 1st format of string to 2nd one in vb.net

1st(datetype string) : "2/12/2008 6:00:00 PM"
2nd(datatype string): "2008-2-12T17:00:00"

note: in 2nd string ,the T is just a alpahbet

Thanks,
Deepak
Feb 11 '08 #3
lue
Here if VB.NET code

Dim dt As DateTime

Dim strDt

dt = Format(#2/12/2008 3:23:00 PM#, "dddd, d MMM yyyy h:m:ss tt ")

strDt = Format(dt, "yyyy-MM-d%T h:m:ss tt")

Lue

"deepak" <de****@discussions.microsoft.comwrote in message
news:52**********************************@microsof t.com...
sorry the 2nd is

2nd(datatype string): "2008-2-12T18:00:00"

Kindly reply me asap.
- Deepak

"deepak" wrote:
>sorry the 2nd is

2nd(datatype string): "2008-2-12T16:00:00"

Kindly reply me asap.
- Deepak
"deepak" wrote:
Hi All,

How to convert the 1st format of string to 2nd one in vb.net

1st(datetype string) : "2/12/2008 6:00:00 PM"
2nd(datatype string): "2008-2-12T17:00:00"

note: in 2nd string ,the T is just a alpahbet

Thanks,
Deepak

Feb 11 '08 #4
Hi Lue,

its giving me finally "2008-02-12T 6:0:00 PM" but i need it as "2008-02-12T
18:00:00"

-Deepak
"lue" wrote:
Here if VB.NET code

Dim dt As DateTime

Dim strDt

dt = Format(#2/12/2008 3:23:00 PM#, "dddd, d MMM yyyy h:m:ss tt ")

strDt = Format(dt, "yyyy-MM-d%T h:m:ss tt")

Lue

"deepak" <de****@discussions.microsoft.comwrote in message
news:52**********************************@microsof t.com...
sorry the 2nd is

2nd(datatype string): "2008-2-12T18:00:00"

Kindly reply me asap.
- Deepak

"deepak" wrote:
sorry the 2nd is

2nd(datatype string): "2008-2-12T16:00:00"

Kindly reply me asap.
- Deepak
"deepak" wrote:

Hi All,

How to convert the 1st format of string to 2nd one in vb.net

1st(datetype string) : "2/12/2008 6:00:00 PM"
2nd(datatype string): "2008-2-12T17:00:00"

note: in 2nd string ,the T is just a alpahbet

Thanks,
Deepak


Feb 11 '08 #5
lue
Yes just format the 2nd one as following
Dim dt As DateTime

Dim strDt

dt = Format(#2/12/2008 6:00:00 PM#, "dddd, d MMM yyyy hh:m:ss tt ")

strDt = Format(dt, "yyyy-MM-d%T HH:m:ss")
Lue

"deepak" <de****@discussions.microsoft.comwrote in message
news:2E**********************************@microsof t.com...
Hi Lue,

its giving me finally "2008-02-12T 6:0:00 PM" but i need it as
"2008-02-12T
18:00:00"

-Deepak
"lue" wrote:
>Here if VB.NET code

Dim dt As DateTime

Dim strDt

dt = Format(#2/12/2008 3:23:00 PM#, "dddd, d MMM yyyy h:m:ss tt ")

strDt = Format(dt, "yyyy-MM-d%T h:m:ss tt")

Lue

"deepak" <de****@discussions.microsoft.comwrote in message
news:52**********************************@microso ft.com...
sorry the 2nd is

2nd(datatype string): "2008-2-12T18:00:00"

Kindly reply me asap.
- Deepak

"deepak" wrote:

sorry the 2nd is

2nd(datatype string): "2008-2-12T16:00:00"

Kindly reply me asap.
- Deepak
"deepak" wrote:

Hi All,

How to convert the 1st format of string to 2nd one in vb.net

1st(datetype string) : "2/12/2008 6:00:00 PM"
2nd(datatype string): "2008-2-12T17:00:00"

note: in 2nd string ,the T is just a alpahbet

Thanks,
Deepak



Feb 11 '08 #6
yeah lue,its woroking...ur great lue....thanks......Ma i add u in msn ..also
i may have some more questions in the coming hours....Kinldy help me...u
dont know u helped so much in this way .. i can not forget really....:-)

- Deepak
"lue" wrote:
Yes just format the 2nd one as following
Dim dt As DateTime

Dim strDt

dt = Format(#2/12/2008 6:00:00 PM#, "dddd, d MMM yyyy hh:m:ss tt ")

strDt = Format(dt, "yyyy-MM-d%T HH:m:ss")
Lue

"deepak" <de****@discussions.microsoft.comwrote in message
news:2E**********************************@microsof t.com...
Hi Lue,

its giving me finally "2008-02-12T 6:0:00 PM" but i need it as
"2008-02-12T
18:00:00"

-Deepak
"lue" wrote:
Here if VB.NET code

Dim dt As DateTime

Dim strDt

dt = Format(#2/12/2008 3:23:00 PM#, "dddd, d MMM yyyy h:m:ss tt ")

strDt = Format(dt, "yyyy-MM-d%T h:m:ss tt")

Lue

"deepak" <de****@discussions.microsoft.comwrote in message
news:52**********************************@microsof t.com...
sorry the 2nd is

2nd(datatype string): "2008-2-12T18:00:00"

Kindly reply me asap.
- Deepak

"deepak" wrote:

sorry the 2nd is

2nd(datatype string): "2008-2-12T16:00:00"

Kindly reply me asap.
- Deepak
"deepak" wrote:

Hi All,

How to convert the 1st format of string to 2nd one in vb.net

1st(datetype string) : "2/12/2008 6:00:00 PM"
2nd(datatype string): "2008-2-12T17:00:00"

note: in 2nd string ,the T is just a alpahbet

Thanks,
Deepak


Feb 11 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Firewalker | last post by:
I am attempting to change the backColor property on the previously instantiated buttons FROM a listbox_doubleClick event. I thought it would be something like this: If...
3
by: Mad Scientist Jr | last post by:
Can someone post a clear example of how to change the background color of an individual datagrid cell for a Windows desktop app? (preferably in vb.net) I found some code on how to do this when...
20
by: andreas | last post by:
When I copy a vb.net project using date formats from one PC with a windows date format f.e. dd/mm/yyyy to another PC having a format yy/mm/dd then I get errors. How can I change for a while in the...
4
by: wildman | last post by:
RE: Replacing Text without changing case?? This code works great, but case has to be exact. Research.Text = Research.Text.Replace(textboxSearch.Text, "<b>" + textboxSearch.Text + "</b>") ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.