Solved

How to get the UTC DateTimeFormat

Posted on 2009-07-02
7
439 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

838 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