473,405 Members | 2,373 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Convert date string into date object

I'm looking to convert a string in "dd/MM/yy" format into a date object. How
do I go about this ?
Apr 7 '08 #1
4 2293
"Tony B" <to***@imageproc.comschrieb
I'm looking to convert a string in "dd/MM/yy" format into a date
object. How do I go about this ?
A look in the docs reveals:
http://msdn2.microsoft.com/en-us/library/b4w53z0y.aspx
Armin
Apr 7 '08 #2
Tony,

As you are in the part of the world where an European language is spoken not
Russian or Swedish and not in the USA, then you can simple try the very
simple optimized .Net command

\\\
dim myDate = CDate(31/12/2008)
///

for older versions than 2008

dim mydate as DateTime = CDate(31/12/2008)

Cor

Apr 8 '08 #3
On Apr 7, 8:53*am, "Tony B" <to...@imageproc.comwrote:
I'm looking to convert a string in "dd/MM/yy" format into a date object. How
do I go about this ?
Intellisense is your friend.

You mention you want to Parse a string into a DateTime, so how about:

DateTime.Parse(...)

Thanks,

Seth Rowe [MVP]
Apr 8 '08 #4
"Tony B" <to***@imageproc.comschrieb:
I'm looking to convert a string in "dd/MM/yy" format into a date object.
How do I go about this ?
'DateTime.ParseExact' + format string, if the date is always in the same
format regardless of the system's date/time format settings.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Apr 10 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Hector A | last post by:
Hi I'm trying to convert a string that already looks like a date to a date that I can use when I pass it from java to the database. I receive the date in format yyyy-mm-dd and I need it to be a...
5
by: goochey | last post by:
I'm trying to convert a Julian Date (Format "4365") into an actual calendar date in Visual Basic, can anyone help me out with this.
2
by: Remi Caron | last post by:
Hi, I took over an Visual Object project (Visual Clipper) in that language there is a function to: Convert a string containing a 32-bit binary date to a date data type. That function is called...
5
by: simon | last post by:
I have datetime variable: Datetime tsEndTime; Should I use (DateTime): tsEndTime=(DateTime)rdr.GetValue(15) or is better to use: tsEndTime=Convert.ToDateTime(rdr.GetValue(15))
12
by: DC Gringo | last post by:
How can I convert this pubLatest to a date with format "m/d/yyyy"? Dim pubLatest As New Date pubLatest = Me.SqlSelectCommand1.Parameters("@pubLatest").Value -- _____ DC G
5
by: XML newbie: Urgent pls help! | last post by:
function to convert string to 1 dimensional array of long in VB.Net
10
by: bonnie.tangyn | last post by:
Dear all In my ASP page, user can enter date in dd/mm/yyyy format. How can I use Javascript to convert dd/mm/yyyy to yyyy-mm-dd hh:mm:ss. Please give me some advices. Cheers Bon
7
by: Mike Howard | last post by:
I'm trying to convert the following (simplified) VB.Net code to C#, that makes use of some externally developed COM code written in VB6. VB.Net Code Sub Main() Dim oAPP As Object Dim oApp2...
6
by: vunet.us | last post by:
How can I convert UTC time such as 1173451235415 to a local time I can read? Thank you
4
by: =?Utf-8?B?YW5kcmV3?= | last post by:
I am running an ASP.net program written in VB. At one point I try to convert a date string into a date time object... this string is from a central dev server and the code works on many other...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.