Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

vbnet convert string to time value

Posted on 2011-03-04
4
Medium Priority
?
552 Views
Last Modified: 2012-05-11
Hi,
I am using a MSChart control and want to represent a time value, the problem is the value ie 0000:0:26 is in a string format, how can I convert this into a numerical format to it can be used in the chart?

Many Thanks
0
Comment
Question by:Soluga
[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
  • 2
  • 2
4 Comments
 
LVL 19

Expert Comment

by:Bardobrave
ID: 35035371
You should manipulate your string to a valid date format and then use a date conversion function.

Check cDate function here for further info:

http://msdn.microsoft.com/en-us/library/s2dy91zy%28v=vs.80%29.aspx
0
 
LVL 1

Author Comment

by:Soluga
ID: 35035641
Yeah, I have tried that, but it just says error converting string.
0
 
LVL 19

Accepted Solution

by:
Bardobrave earned 2000 total points
ID: 35035688
Probably because a format like 0000:0:26 is not supported as a date string. This is why I tell you that you need to manipulate your string. You need to convert it to a valid date format before calling the date conversion function.

You can see a list of valid date string formats on the above link
0
 
LVL 1

Author Closing Comment

by:Soluga
ID: 35036475
Yep OK, I will probably just convert into a double or a decimal.

Thanks
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

636 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