Results 1 to 5 of 5

Thread: Filtering using English date format

  1. #1
    Bob Cummings Guest

    Filtering using English date format

    Hi

    I have a problem when using a filter field which is based on a date field.

    The grid shows the field correctly formatted for English: dd/mm/yy but to search correctly using the filter I can only get the correct result by entering the date in the format mm/dd/yy.

    Any ideas?

    Thanks
    Bob Cummings

  2. #2
    Mark Guest

    Filtering using English date format (reply)

    .
    Bob,
    Have you tried setting the DateFormat parameter in dbOptions?
    http://www.aspdb.com/docs/aspdbman.htm#dbOptions
    Mark.

    ------------
    Bob Cummings at 1/13/00 9:54:16 AM

    Hi

    I have a problem when using a filter field which is based on a date field.

    The grid shows the field correctly formatted for English: dd/mm/yy but to search correctly using the filter I can only get the correct result by entering the date in the format mm/dd/yy.

    Any ideas?

    Thanks
    Bob Cummings

  3. #3
    Bob Cummings Guest

    Filtering using English date format (reply)


    I have included the following:

    MyDb.dbOptions="DateFormat=DD-MM-YY,CellFontTag=SIZE=1,HeaderFontTag=size=2"

    The filter sql shown on the status bar shows the following:

    ProgLeader LIKE 'Hailstone Peter%' AND UIO_STARTDATE > #01-08-99#

    but it is showing up earlier dates. Our network is English date and it works if I enter it as 8-1-99.

    Thanks

    Bob

    ------------
    Bob Cummings at 1/13/00 9:54:16 AM

    Hi

    I have a problem when using a filter field which is based on a date field.

    The grid shows the field correctly formatted for English: dd/mm/yy but to search correctly using the filter I can only get the correct result by entering the date in the format mm/dd/yy.

    Any ideas?

    Thanks
    Bob Cummings

  4. #4
    Frank Guest

    Filtering using English date format (reply)

    DO NOT USE the DATEORMAT option option. It is not neccessary!!!

    1. Make sure you are using Access. Go to Access query and use SQL with to confirm the statement is good.

    .... WHERE ProgLeader LIKE 'Hailstone Peter%' AND UIO_STARTDATE > #01-08-99#

    2. Type in the following asp program and run it ->

    <%
    response.write(&#34;Date=&#34; & isdate(&#34;08-01-99&#34)
    response.write(&#34;<BR>Month=&#34; & month(&#34;08-01-99&#34)
    response.write(&#34;<BR>Date=&#34; & Day(&#34;08-01-99&#34)
    response.write(&#34;<BR>Year=&#34; & year(&#34;08-01-99&#34)
    %>

    If result is Date=True and the date showed are OK, then you should be OK. If not then there is a locale problem.

    FK





    ------------
    Bob Cummings at 1/13/00 10:20:07 AM


    I have included the following:

    MyDb.dbOptions=&#34;DateFormat=DD-MM-YY,CellFontTag=SIZE=1,HeaderFontTag=size=2&#34;

    The filter sql shown on the status bar shows the following:

    ProgLeader LIKE &#39;Hailstone Peter%&#39; AND UIO_STARTDATE > #01-08-99#

    but it is showing up earlier dates. Our network is English date and it works if I enter it as 8-1-99.

    Thanks

    Bob

    ------------
    Bob Cummings at 1/13/00 9:54:16 AM

    Hi

    I have a problem when using a filter field which is based on a date field.

    The grid shows the field correctly formatted for English: dd/mm/yy but to search correctly using the filter I can only get the correct result by entering the date in the format mm/dd/yy.

    Any ideas?

    Thanks
    Bob Cummings

  5. #5
    Bob Cummings Guest

    Filtering using English date format (reply)


    Frank:

    Your asp code gave the following:

    Date=True
    Month=1
    Date=8
    Year=1999

    I then checked the Locale file on both server and client which are UK.

    My next step is to install the new ASPDb dll.

    HOWEVER, I have found a reasonable workround. If I set the DATEFORMAT option to MM-DD-YY and it works fine!

    Thanks for your help

    ------------
    Frank at 1/13/00 11:22:24 PM

    DO NOT USE the DATEORMAT option option. It is not neccessary!!!

    1. Make sure you are using Access. Go to Access query and use SQL with to confirm the statement is good.

    .... WHERE ProgLeader LIKE &#39;Hailstone Peter%&#39; AND UIO_STARTDATE > #01-08-99#

    2. Type in the following asp program and run it ->

    <%
    response.write(&#34;Date=&#34; & isdate(&#34;08-01-99&#34)
    response.write(&#34;<BR>Month=&#34; & month(&#34;08-01-99&#34)
    response.write(&#34;<BR>Date=&#34; & Day(&#34;08-01-99&#34)
    response.write(&#34;<BR>Year=&#34; & year(&#34;08-01-99&#34)
    %>

    If result is Date=True and the date showed are OK, then you should be OK. If not then there is a locale problem.

    FK





    ------------
    Bob Cummings at 1/13/00 10:20:07 AM


    I have included the following:

    MyDb.dbOptions=&#34;DateFormat=DD-MM-YY,CellFontTag=SIZE=1,HeaderFontTag=size=2&#34;

    The filter sql shown on the status bar shows the following:

    ProgLeader LIKE &#39;Hailstone Peter%&#39; AND UIO_STARTDATE > #01-08-99#

    but it is showing up earlier dates. Our network is English date and it works if I enter it as 8-1-99.

    Thanks

    Bob

    ------------
    Bob Cummings at 1/13/00 9:54:16 AM

    Hi

    I have a problem when using a filter field which is based on a date field.

    The grid shows the field correctly formatted for English: dd/mm/yy but to search correctly using the filter I can only get the correct result by entering the date in the format mm/dd/yy.

    Any ideas?

    Thanks
    Bob Cummings

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •