Solved

How to get the UTC DateTimeFormat

Posted on 2009-07-02
7
431 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
Comment Utility
Hi

Try this

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

Author Comment

by:vishnu_kavalakuntla
Comment Utility
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
Comment Utility
what is your input ?

09-07-02-10-34-55 or 090702103455
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 

Author Comment

by:vishnu_kavalakuntla
Comment Utility
Hello John,

Thanks i did.

how to give rating..
0
 
LVL 14

Accepted Solution

by:
GiftsonDJohn earned 500 total points
Comment Utility
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
Comment Utility
Thanks John,
For your assistance.
Bye.
0
 

Author Comment

by:vishnu_kavalakuntla
Comment Utility
This question is completed.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

744 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now