Solved

How to get the UTC DateTimeFormat

Posted on 2009-07-02
7
442 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
RHCE - Red Hat OpenStack Prep Course

This course will provide in-depth training so that students who currently hold the EX200 & EX210 certifications can sit for the EX310 exam. Students will learn how to deploy & manage a full Red Hat environment with Ceph block storage, & integrate Ceph into other OpenStack service

 

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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

631 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