Hi!

On Nov 27, Jerry wrote:
> >> Hi
> >>
> >> I have 2 text columns VARCHAR 50 and I put a date in them in format
> >>
> >> yyyymmddhhmmss
> 
> >> Is there a way to force string to be read as interger (same as CINT in
> >> VBScript, but I need to to this in mySQL).
> 
> >Yes, string_expression+0 will be an integer. It's not pretty, but it
> >works.
> 
> Hm, doesn't work :-(
> 
> What is wrong here:
> 
> SQLstmt = "SELECT r_date+0 as date, count(*) as count"
> SQLStmt = SQLstmt & "FROM forum_reply "
> SQLStmt = SQLStmt & "  WHERE topic_ID ="  & topic_ID & " AND date  <  " &
> session("date")
> Session("date") holds 20011126121222
> 
> Is 14 number digit to much to use 

14 digit number is ok - MySQL uses longlong internally
and can handle up to 9223372036854775807. Of course, your platform
should support it, but it, probably, does.

> or what is wrong?

you had to write "... AND date+0 < "

Regards,
Sergei

-- 
MySQL Development Team
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, http://www.mysql.com/
/_/  /_/\_, /___/\___\_\___/  Osnabrueck, Germany
       <___/

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to