CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeCharge.Discussion

 Help me with validate field DATE

Print topic Send  topic

Author Message
Jaroslav Steigauf
Posted: 06/19/2001, 12:00 PM

Hi all,

can you send me source code for validate field DATE ?

I need check field date on form such as DD/MM/YYYYY, because
I get error message from Access 2000 ' not correct date ...'


ASP or JavaScript


regards

jaro

Alexey Alexapolsky
Posted: 06/20/2001, 1:57 AM


aren't you trying to search by date field somewhere in your project ?
then it's understood , cc uses ansi sql while access' dates are in
#xx/xx/xx# format , you must add hashes to this date through events

--
alex
cc support

Jaroslav Steigauf <thskk@thskk.sk> wrote in message
news:9go7fl$29a$1@news.codecharge.com...
> Hi all,
>
> can you send me source code for validate field DATE ?
>
> I need check field date on form such as DD/MM/YYYYY, because
> I get error message from Access 2000 ' not correct date ...'
>
>
> ASP or JavaScript
>
>
> regards
>
> jaro
>
>

Jaroslav Steigauf
Posted: 06/20/2001, 3:41 AM

No for search. It is OK.
If user input BAD date format on form, then he has this error message.

Data type mismatch in criteria expression. (Microsoft JET Database Engine)

I looking for a 'some solution for this message.

jaro


"Alexey Alexapolsky" <alexa@codecharge.com> wrote in message
news:9gpohl$hq8$1@news.codecharge.com...
>
> aren't you trying to search by date field somewhere in your project ?
> then it's understood , cc uses ansi sql while access' dates are in
> #xx/xx/xx# format , you must add hashes to this date through events
>
> --
> alex
> cc support
>
> Jaroslav Steigauf <thskk@thskk.sk> wrote in message
>news:9go7fl$29a$1@news.codecharge.com...
> > Hi all,
> >
> > can you send me source code for validate field DATE ?
> >
> > I need check field date on form such as DD/MM/YYYYY, because
> > I get error message from Access 2000 ' not correct date ...'
> >
> >
> > ASP or JavaScript
> >
> >
> > regards
> >
> > jaro
> >
> >
>
>

Anthony Trotter
Posted: 06/20/2001, 4:09 AM

Jaroslav,

The easiest solution would be to validate the input prior to the
submission with JavaScript. A great resource for just about any
script you would need can be found at
http://javascript.internet.com/forms/.

Another option is to have your users input the various parts of the
date separately, then concatenate them prior to the submission. You
could do this with list boxes for the day, month and year or with open
text boxes. If you choose this method, you will have more validation
to perform.

Good luck.


"Jaroslav Steigauf" <thskk@thskk.sk> wrote in message
news:9gpuk1$oke$1@news.codecharge.com...
> No for search. It is OK.
> If user input BAD date format on form, then he has this error
message.
>
> Data type mismatch in criteria expression. (Microsoft JET Database
Engine)
>
> I looking for a 'some solution for this message.
>
> jaro
>
>
> "Alexey Alexapolsky" <alexa@codecharge.com> wrote in message
>news:9gpohl$hq8$1@news.codecharge.com...
> >
> > aren't you trying to search by date field somewhere in your
project ?
> > then it's understood , cc uses ansi sql while access' dates are in
> > #xx/xx/xx# format , you must add hashes to this date through
events
> >
> > --
> > alex
> > cc support
> >
> > Jaroslav Steigauf <thskk@thskk.sk> wrote in message
> >news:9go7fl$29a$1@news.codecharge.com...
> > > Hi all,
> > >
> > > can you send me source code for validate field DATE ?
> > >
> > > I need check field date on form such as DD/MM/YYYYY, because
> > > I get error message from Access 2000 ' not correct date ...'
> > >
> > >
> > > ASP or JavaScript
> > >
> > >
> > > regards
> > >
> > > jaro
> > >
> > >
> >
> >
>
>

Jaroslav Steigauf
Posted: 06/20/2001, 5:36 AM

thanks

jaro

"Anthony Trotter" <support@worldnetcity.com> wrote in message
news:9gq08e$qg1$1@news.codecharge.com...
> Jaroslav,
>
> The easiest solution would be to validate the input prior to the
> submission with JavaScript. A great resource for just about any
> script you would need can be found at
> http://javascript.internet.com/forms/.
>
> Another option is to have your users input the various parts of the
> date separately, then concatenate them prior to the submission. You
> could do this with list boxes for the day, month and year or with open
> text boxes. If you choose this method, you will have more validation
> to perform.
>
> Good luck.
>
>
> "Jaroslav Steigauf" <thskk@thskk.sk> wrote in message
>news:9gpuk1$oke$1@news.codecharge.com...
> > No for search. It is OK.
> > If user input BAD date format on form, then he has this error
> message.
> >
> > Data type mismatch in criteria expression. (Microsoft JET Database
> Engine)
> >
> > I looking for a 'some solution for this message.
> >
> > jaro
> >
> >
> > "Alexey Alexapolsky" <alexa@codecharge.com> wrote in message
> >news:9gpohl$hq8$1@news.codecharge.com...
> > >
> > > aren't you trying to search by date field somewhere in your
> project ?
> > > then it's understood , cc uses ansi sql while access' dates are in
> > > #xx/xx/xx# format , you must add hashes to this date through
> events
> > >
> > > --
> > > alex
> > > cc support
> > >
> > > Jaroslav Steigauf <thskk@thskk.sk> wrote in message
> > >news:9go7fl$29a$1@news.codecharge.com...
> > > > Hi all,
> > > >
> > > > can you send me source code for validate field DATE ?
> > > >
> > > > I need check field date on form such as DD/MM/YYYYY, because
> > > > I get error message from Access 2000 ' not correct date ...'
> > > >
> > > >
> > > > ASP or JavaScript
> > > >
> > > >
> > > > regards
> > > >
> > > > jaro
> > > >
> > > >
> > >
> > >
> >
> >
>
>

Frank Rocco
Posted: 06/20/2001, 6:12 AM

Hello,

I'm learning ASP also, but thought you could use VBScript:
MyCheck = IsDate(MyDate)
if MyCheck = True Then
MyShortDate = CDate(MyDate)
end if

HTH

Frank

"Jaroslav Steigauf" <thskk@thskk.sk> wrote in message
news:9gq5c3$vsa$1@news.codecharge.com...
> thanks
>
> jaro
>
> "Anthony Trotter" <support@worldnetcity.com> wrote in message
>news:9gq08e$qg1$1@news.codecharge.com...
> > Jaroslav,
> >
> > The easiest solution would be to validate the input prior to the
> > submission with JavaScript. A great resource for just about any
> > script you would need can be found at
> > http://javascript.internet.com/forms/.
> >
> > Another option is to have your users input the various parts of the
> > date separately, then concatenate them prior to the submission. You
> > could do this with list boxes for the day, month and year or with open
> > text boxes. If you choose this method, you will have more validation
> > to perform.
> >
> > Good luck.
> >
> >
> > "Jaroslav Steigauf" <thskk@thskk.sk> wrote in message
> >news:9gpuk1$oke$1@news.codecharge.com...
> > > No for search. It is OK.
> > > If user input BAD date format on form, then he has this error
> > message.
> > >
> > > Data type mismatch in criteria expression. (Microsoft JET Database
> > Engine)
> > >
> > > I looking for a 'some solution for this message.
> > >
> > > jaro
> > >
> > >
> > > "Alexey Alexapolsky" <alexa@codecharge.com> wrote in message
> > >news:9gpohl$hq8$1@news.codecharge.com...
> > > >
> > > > aren't you trying to search by date field somewhere in your
> > project ?
> > > > then it's understood , cc uses ansi sql while access' dates are in
> > > > #xx/xx/xx# format , you must add hashes to this date through
> > events
> > > >
> > > > --
> > > > alex
> > > > cc support
> > > >
> > > > Jaroslav Steigauf <thskk@thskk.sk> wrote in message
> > > >news:9go7fl$29a$1@news.codecharge.com...
> > > > > Hi all,
> > > > >
> > > > > can you send me source code for validate field DATE ?
> > > > >
> > > > > I need check field date on form such as DD/MM/YYYYY, because
> > > > > I get error message from Access 2000 ' not correct date ...'
> > > > >
> > > > >
> > > > > ASP or JavaScript
> > > > >
> > > > >
> > > > > regards
> > > > >
> > > > > jaro
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>

Frédéric Malenfant
Posted: 06/20/2001, 6:37 AM

I always have this problem, because the default english SQL must be entered
in MM/DD/YYYY because english people speaks like that... but in french we
are saying "1 janvier 2001" so we enter our date in the DD/MM/YYYY format
like you.

So, when you call your SQL, you have to transform the date with mid or other
ASP functions if you use ASP, maybe you can transform them in javascript
before submitting the page, or in the ASP that writes in the database. And
after, when you read from database, if your IIS is english and your SQL is
english, you will read MM/DD/YYYY date, and you will have to retransform it
to display it correctly. I hate DATE format ! I would like to use a 8
character format for date-only and 14 character string for date/time format
it would be very better than this stupid DATE format :-)

I hope it will helps.

Tony Tomov
Posted: 06/20/2001, 7:59 AM

This is a multi-part message in MIME format.
--------------881737CA4111CA39E6946566
Content-Type: text/plain; charset=koi8-r
Content-Transfer-Encoding: 7bit

Another possible solution i to make a pick up date from calender.
This way the user can choise the date and the appropriate format will
be filled in the date field. To make a diffrent date format loock at
function retunDate in file calender.html
I send you a javascript code and example.

Regards
Tony Tomov


> Hi all,
>
> can you send me source code for validate field DATE ?
>
> I need check field date on form such as DD/MM/YYYYY, because
> I get error message from Access 2000 ' not correct date ...'
>
> ASP or JavaScript
>
> regards
>
> jaro

--------------881737CA4111CA39E6946566
Content-Type: application/x-zip-compressed;
name="calendar.zip"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="calendar.zip"

UEsDBBQAAgAIAFdTzyrJjXniuAgAAAIxAAANAAAAY2FsZW5kYXIuaHRtbO1b/2/aSBb/eSPl
f5j6dA0RIWBIm+aCkQw2wS3YCDvb5U77gwNOYi3YkW3Sjbr53+/NjI1nbKAku1NdV4eqYM+8
+cz7Pu8NanvgjIadw4P2QFc1+Eao7RjOUO/03IUXzN0I2d7CmyXtOh0+PABauzcxxg4aqubV
tXqlK9JH99G1Z5H/kEgY602tdnhQryP12hlYk38h+rkOfgvCLwGZGVma0Td0DXWnMD0Jb7wo
QZ9P0WAVJ96ckPSs0Vg1p+lq00vimfvgoV64XK4Cf+YmfhjEmJ3Dg9tVMMOvKPYSzU28yjH6
ikVBKLn349M5DPV9bzGHAQWFD17gRfngJUPpB3g53VFBa5LTR3ex8i7xVngGmLN1B2nqFOQw
nQFSTQ1NdXWCHAv+wfiRDbOOTskfQYkgOIEMvC+IcniZT87dJzoZfjm9yyRg5pdhkNzn8yP8
yhE8efAnJ5jC63rev0UVMt9GcqOxVgz+kOGqguSLRiOlfqZf3iL2NlE2GyzlWhtGH6lEYPRZ
tdFYtW2wrGEiZ6Cb8DqxdXhUHUYnmCuqbND53Pvduq0c1Y+OOfawZH4wSoVPqePVTZxEfnBX
aZwUAKS6dIyqSM4kzz50L4LDLZePkaIgqSGht2+zjU7B6e9gvw7A8CgEieGmiCef8BAlLtZr
H9wo9owgyZhiKanMWuoQJZnTgYUbJwYvdfMEbZncrA7YYpcy8PQ3VIGZVFARST5hF5eVQFcx
KoCBsgKmqUNzdJs0UbR9rgW6//E6aDnROT/Dn3kuDMPMc3EptVdx8ZJ3ipq8CwKLVkIg8aWk
gpdXw9dPu5LEzgSxLTn8RDLebThbxdTftn1wIsy0MgfypRckpzN30YNtonBxuqSRQI4Jb05c
D9aQ0R2rMFs0r7I7PeX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jdGlv
bi5odG1sXZLdbuIwEIXvkXgHyyuVrQRJQO3NEkcKeEIikZ8NAy17lyYujQoxCkZ032YftU7C
oqqWbNljnzPjz7Z9DJdOv9fv2T64XM/sENAlPmIygt/rYMPoXFZKVGqEf4+CknkcIUTIqBIf
ynxTh/2U5G9ZfRKKXcqqkJfTaDx5nNCbV+SGwOgCIkhdjNMvFmGZ1/IkXxXxap0kyXaCPBjW
d2lSy11QfNHdThtQlErWBpf5+aBrbJUY4BKcSFxIazi2zS6it8zrJfV0FvNtE0qcu+rldJza
ZtJteHEadonL6nhWnqwPRBfjx5wl8QobzYsDGklNeKbEr3+2OWuCQZSskeA2AYbwjGTjLte6
+DA0OTe3utHOlbsIY7IK/gAbW41Q007BY/QHJbKa78v8ndGOpFHoBF4p9gVhpN8rrrc0boUZ
rdk0z/aiKrJan7oK5VFUPwf/40bzTINhs9bjU8DRZxPLGvoQLHxkk0drcN+iC8IFWaVzRm/K
XflKySxOOaTMcmzT1b0h1LJqiF45tnC7v/QJUEsBAhQAFAACAAgAV1PPKsmNeeK4CAAAAjEA
AA0AAAAAAAAAAQAgALaBAAAAAGNhbGVuZGFyLmh0bWxQSwECFAAUAAIACACnWc8qJJBl0Y8B
AABUAgAAFwAAAAAAAAABACAAtoHjCAAAY2FsZW5kYXJfc2VsZWN0aW9uLmh0bWxQSwUGAAAA
AAIAAgCAAAAApwoAAAAA
--------------881737CA4111CA39E6946566--
Jaroslav Steigauf
Posted: 06/20/2001, 10:53 AM

Thanks more all.


jaro

"Tony Tomov" <ttomov@abs.bg> wrote in message
news:3B30BB59.16402F21@abs.bg...
> Another possible solution i to make a pick up date from calender.
> This way the user can choise the date and the appropriate format will
> be filled in the date field. To make a diffrent date format loock at
> function retunDate in file calender.html
> I send you a javascript code and example.
>
> Regards
> Tony Tomov
>
>
> > Hi all,
> >
> > can you send me source code for validate field DATE ?
> >
> > I need check field date on form such as DD/MM/YYYYY, because
> > I get error message from Access 2000 ' not correct date ...'
> >
> > ASP or JavaScript
> >
> > regards
> >
> > jaro
>


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.