RE: Date Compare
- From: stcheng@xxxxxxxxxxxxxxxxxxxx (Steven Cheng[MSFT])
- Date: Thu, 16 Feb 2006 05:57:55 GMT
Hi Peter,
Welcome to the ASP.NET newsgroup.
From your description, I understand you have a certain ASP.NET web pagewhich contain two text field to let user input date time and you need to
compare the date/time in the two text fields. Since the input date's
format in the two text fields may vary, you're wondering a simple and
better means to compare them(the string format ), correct?
Based on my experience, since the input data in the text fields are of text
format and the format of the date/time may also vary, the better approach
maybe postback the page and parse the data in text field into .net DateTime
class instance and do the comparation. Is it posslbe that you do the work
at serverside like this?
For clientside, date/time parsing and format functionality are limited.
There does exists an Date class(javascript class object) which has parse
method and other client script methods, however not all the browsers will
support them. Anyway, here are some web article introduce use the
javascript Date object:
METHOD: Date::parse
http://www.devguru.com/Technologies/ecmascript/quickref/date_parse.html
http://www.comptechdoc.org/independent/web/cgi/javamanual/javadate.html
.
- Follow-Ups:
- Re: Date Compare
- From: Peter
- Re: Date Compare
- References:
- Date Compare
- From: Peter
- Date Compare
- Prev by Date: Re: Tool to make DLL's
- Next by Date: Re: Date Compare
- Previous by thread: Date Compare
- Next by thread: Re: Date Compare
- Index(es):
Relevant Pages
|