Subject | Re: [firebird-support] Re: Date, Time, TimeStamp Format/Separator ... |
---|---|
Author | Martijn Tonies |
Post date | 2004-04-15T09:31:10Z |
Hi,
Well, there are several ways to do this - probably the easiest
is to use parameters for your date/time/datetime values:
WHERE ... = :MyDateTimeParam
This way, you don't have to bother about locales.
Alternatively, use the English style:
WHERE ... = 'mm/dd/yyyy'
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com
> > > how can i get the active date, time, timestamp format andAh, ok :-) ...
> > > separator with sql ?
> > >
> > > i.e. dd/mm/yyyy or mm/dd/yyyy with separator '/'
> > > or mm.dd.yyyy with separator '.' etc
> >
> > SELECT CURRENT_TIMESTAMP, CURRENT_TIME,
> > CURRENT_DATE
> >
> > FROM RDB$DATABASE
> >
> > The separator is a client side display thingy.
>
> Maybe i wasn't clear enough :)
>
> I want to construct a sql query through code ( Delphi ). But
> because the client's are in varius locales (Greek, English,
> Bulgarian, Romanian ) different from the server locale i need a
> universal way of constructing the date field or the time field or
> the timestamp. Else i get an error message ... You
> know '...transliterate blablabla ...'.
Well, there are several ways to do this - probably the easiest
is to use parameters for your date/time/datetime values:
WHERE ... = :MyDateTimeParam
This way, you don't have to bother about locales.
Alternatively, use the English style:
WHERE ... = 'mm/dd/yyyy'
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com