Solved

How to get the UTC DateTimeFormat

Posted on 2009-07-02
7
438 Views
Last Modified: 2013-12-17
Hi,

I have a string like 090702103455. I want to convert this string to UTC DateTimeFormat.
I Know there is a Function TryParse in DateTime. which will take TryParse(String, dt).
String^ str =090702103455;
DateTime dt;
DateTime::TryParse(str, dt)
 
It is not parsing. Can you please suggest how to convert or format ?

Open in new window

0
Comment
Question by:vishnu_kavalakuntla
  • 4
  • 2
7 Comments
 
LVL 14

Expert Comment

by:GiftsonDJohn
ID: 24762051
Hi

Try this

DateTime.FromFileTime(Convert.ToInt64(str)).ToUniversalTime()
0
 

Author Comment

by:vishnu_kavalakuntla
ID: 24762230
Hi John,

Thank you for your reply, Acually the problem is whatever the string which i am passing is datetime.
it is 09-07-02-10-34-55(utc time). I got this format as a string which i have send previously. but i want to  convert this into UtcDateTime format.
any help, i have tried the above suggestion,but no result.

Thanks.
0
 
LVL 15

Expert Comment

by:jinal
ID: 24764019
what is your input ?

09-07-02-10-34-55 or 090702103455
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

Author Comment

by:vishnu_kavalakuntla
ID: 24775729
Hello John,

Thanks i did.

how to give rating..
0
 
LVL 14

Accepted Solution

by:
GiftsonDJohn earned 500 total points
ID: 24793247
Close the question by accepting the solution as answer. There you will get an option to choose among.
0
 

Author Closing Comment

by:vishnu_kavalakuntla
ID: 31599122
Thanks John,
For your assistance.
Bye.
0
 

Author Comment

by:vishnu_kavalakuntla
ID: 24802792
This question is completed.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Error on link 14 48
How useful is the free version of Selenium? 3 37
Modal Popup Extender control 1 20
.NET 2008 VB and C# 6 28
The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question