How to get the UTC DateTimeFormat

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

vishnu_kavalakuntlaAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
GiftsonDJohnConnect With a Mentor Commented:
Close the question by accepting the solution as answer. There you will get an option to choose among.
0
 
GiftsonDJohnCommented:
Hi

Try this

DateTime.FromFileTime(Convert.ToInt64(str)).ToUniversalTime()
0
 
vishnu_kavalakuntlaAuthor Commented:
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
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
jinalCommented:
what is your input ?

09-07-02-10-34-55 or 090702103455
0
 
vishnu_kavalakuntlaAuthor Commented:
Hello John,

Thanks i did.

how to give rating..
0
 
vishnu_kavalakuntlaAuthor Commented:
Thanks John,
For your assistance.
Bye.
0
 
vishnu_kavalakuntlaAuthor Commented:
This question is completed.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.