Ask a Question related to ASP.NET General, Design and Development.
-
Daniel Bass #1
Re: String to Date
rob,
with vb you can get a string in the format
"DD/MM/YYYY HH:MM:SS"
or month first, depending on your windows locale, to a Date object by saying
Dim myDate As Date
myDate = "01/01/2003 16:32"
"Robert" <robert_dx@gmx.com> wrote in message
news:086801c34478$4d1baed0$a301280a@phx.gbl...> Hi,
>
> how can a String like "3/22/1999 6:0:0" be converted to a
> DateTime object. The Parse method does not work and
> ParseExact is not really explained in the help.
>
> Does anyone know a solution?
>
> Thanks
> Rob
Daniel Bass Guest
-
Why can I pass a string, but not a date?
I have this custom component that at the moment just repeats the passed in value. It works if I pass in a string, but if I pass the date I... -
extract a date from a string
I'm trying to figure out a way to extract dates from a string of any length using strtotime. strtotime only works if the date is formatted to GNU... -
Help on processinf Date String.
Pandey Rajeev-A19514 wrote at Wed, 10 Sep 2003 11:56:01 +0530: Here's a complete example working with Date::Manip. use Date::Manip; my... -
from epoch to date string
greetings, is there a revers of this below -- in a one-liner format? i.e. input to be `date` and output to be number of seconds since epoch. ... -
Cast from String To Date
Are you validating the entry before the cast occurs? My guess would be that someone is entering a string that couldn't possible be a date. Try... -
Steve C. Orr, MCSD #2
Re: String To Date
The Convert.ToDateTime method should work no matter which language you're
using.
Here's more info:
[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemconvertclasstodatetimetopic13.asp[/url]
--
I hope this helps,
Steve C. Orr, MCSD
[url]http://Steve.Orr.net[/url]
"Jim Owen" <jkoseattle@comcast.net> wrote in message
news:OMM0mzJUDHA.3192@tk2msftngp13.phx.gbl...> Simple question:
>
> User enters date into text field. I need to post it to an object in a
> System.DateTime format. How do I turn his string into a date?
>
> --
> - Jim Owen
> 206-501-6936
>
>
Steve C. Orr, MCSD Guest



Reply With Quote

