Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to get the UTC DateTimeFormat

Posted on 2009-07-02
7
Medium Priority
?
444 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
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 

Author Comment

by:vishnu_kavalakuntla
ID: 24775729
Hello John,

Thanks i did.

how to give rating..
0
 
LVL 14

Accepted Solution

by:
GiftsonDJohn earned 1500 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

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

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…
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
Integration Management Part 2
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

916 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