ODBiC Discussion Board


Weird problem with field size

by Tim Logan, August 24, 2005 07:20

I came across something weird today. I store dates in YYYYMMDD format in a text field then format them as needed when displaying them. Today I set the field size to 8. When I use the code below I get incorrect results.

<!--set myDate = $mid($myDate$,5,2)"/"$mid($myDate$,7,2)"/"$left($myDate$,4)-->

Instead of getting MM/DD/YYYY I get MM/DD/YYY (missing last digit of year)

If I increase the field size to 9 then it works as expected.

Database: Access 2000 ODBScript version: I don't remember, but file date is 4/11/05



Replies:


Post Your Reply:

Name   
E-mail  optional
Topic  
Message:

HTTP Link: 
Link text: 

          


Copyright ©1997-2003, Roger Harris. All rights reserved.