Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / February 2008

Tip: Looking for answers? Try searching our database.

changing string format

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
deepak - 11 Feb 2008 17:06 GMT
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
deepak - 11 Feb 2008 17:16 GMT
sorry the 2nd is

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

Kindly reply me asap.
- Deepak

> Hi All,
>
[quoted text clipped - 7 lines]
> Thanks,
> Deepak
deepak - 11 Feb 2008 17:18 GMT
sorry the 2nd is

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

Kindly reply me asap.
- Deepak

> sorry the 2nd is
>
[quoted text clipped - 14 lines]
> > Thanks,
> > Deepak
lue - 11 Feb 2008 17:48 GMT
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

> sorry the 2nd is
>
[quoted text clipped - 21 lines]
>> > Thanks,
>> > Deepak
deepak - 11 Feb 2008 18:02 GMT
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

> Here if VB.NET code
>
[quoted text clipped - 33 lines]
> >> > Thanks,
> >> > Deepak
lue - 11 Feb 2008 18:14 GMT
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

> Hi Lue,
>
[quoted text clipped - 41 lines]
>> >> > Thanks,
>> >> > Deepak
deepak - 11 Feb 2008 18:27 GMT
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

> Yes just format the 2nd one as following
> Dim dt As DateTime
[quoted text clipped - 52 lines]
> >> >> > Thanks,
> >> >> > Deepak

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.