Subject | Re: [ib-support] Date Format in IB |
---|---|
Author | Helen Borrie |
Post date | 2002-10-30T14:01:42Z |
At 12:27 AM 31-10-02 +1100, you wrote:
InterBase support list.)
However, for a clue where to start looking for a solution...IB doesn't
store dates in any format you would recognise as a date - it's a
number. Delphi knows it is a date field and by default displays it in
controls as a string based on the Windows locale settings on the local
machine. Depending on the components you are using for data access you can
have more or less control over the output string displayed. Look at the
DisplayText property of TField and the Format() function.
What you see in controls doesn't have any effect on how IB stores the date.
For more help on Delphi stuff, try one of the delphi forums on the Borland
news server.
Helen
>Hi this is my first post to this group and compared to what I have beenThis is a Delphi problem, not an InterBase one. (This is a Firebird and
>reading since joining several weeks ago my problem is hopefully a trivial
>one. I did post this question on borland's Interbase.opensource newsgroup
>but as I haven't had a response I thought I'd use this as my introduction to
>this group.
>
>I have a date field in a table and am using a Delphi TMaskEdit field to
>enable date entry in the format 19032002 but what I am finding is that the
>is stored and retrieved from IB as 19/3/2002. Is there a way to change this
>so that the dates' day and month are in fact stored and retrieved in '00'
>format?
>
>Thanks for your help.
InterBase support list.)
However, for a clue where to start looking for a solution...IB doesn't
store dates in any format you would recognise as a date - it's a
number. Delphi knows it is a date field and by default displays it in
controls as a string based on the Windows locale settings on the local
machine. Depending on the components you are using for data access you can
have more or less control over the output string displayed. Look at the
DisplayText property of TField and the Format() function.
What you see in controls doesn't have any effect on how IB stores the date.
For more help on Delphi stuff, try one of the delphi forums on the Borland
news server.
Helen