Date woes

Bart Pietercil bart.pietercil at gmail.com
Mon Mar 26 08:20:45 CDT 2007


Hi Ivan,

thanks for looking into this.
Referring to Thorstens answer I think the problem lies in RB.

Did you try to reproduce the problem using RB and a VDate.Getdate  
function ?

Probably the GetDate function does the same as what I was doing in RB

aDate.sqldate = myCursor.Field(DateFieldName).GetString ( when the  
DB.DateFormat is set to yyyymmdd)

because that is giving the exact same problem.

So it may not be an internal Valentina problem, but maybe a  
conversion problem when the GetDate "delivers" an RB Date

hth

Bart


On 26-mrt-07, at 14:50, Ivan Smahin wrote:

> Hello Bart,
>
> Monday, March 26, 2007, 2:51:45 PM, you wrote:
>
> BP> Hi,
>
>
> BP> in a table I have (among other fields) 2 datefields
>
> BP> datefield1  is set to a valid sqldate when inserting a new record
> BP> datefield2 is not touched and presumably defaults automatically
> BP> 0000-00-00
>
> BP> The db is set to yyyymmdd
>
> BP> So far everything is as expected
>
> BP> However when I start retrieving values then this code gives
> BP> unexpected results:
>
> BP>          case EVFieldType.kTypeDate
>
> BP>            DateString = mCursor.Field(i).GetString ---> 0000-00-00
> BP>            aDate = mCursor.DateField(i).GetDate()--->0002-11-30
>
> BP> aDate is now 30/11/02
>
> BP> Why ?
>
> BP> I mean where does that value come from and how can I make the
> BP> distinction whether the date value is legitimate or the  
> datevalue is
> BP> not a valid date ?
>
> Could  you  send  me  some  little  test  project  -  just I could not
> reproduce it.
>
> -- 
> Best regards,
> Ivan Smahin
> Senior Software Engineer
> Paradigma Software, Inc
> Valentina - The Ultra-Fast Database
> http://www.valentina-db.com
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina



More information about the Valentina mailing list