Subject [Ticket #234] [firebird-support] Re: Problems selecting on Timestamp.
Author Desarrollo
This is a notification from the Help Desk.




On Mar 07, 2014 @ 03:29 pm, kjell.rilbe@... wrote:
Den 2011-11-09 10:39 skrev Mark Rotteveel såhär:
>
> On Wed, 9 Nov 2011 10:35:18 +0100, Kjell Rilbe <kjell.rilbe@...
> <mailto:kjell.rilbe%40datadia.se>>
> wrote:
> > Den 2011-11-09 10:31 skrev canacourse såhär:
> >>
> >>
> >>
> >> Kjell,
> >>
> >> Doesn’t using the dot separator imply that non us date formats are
> >> being used? i.e. 07/11/2011 is interpreted as MM/DD/YYYY while
> >> 07.11.2011 is interpreted as DD/MM/YYYY?
> >>
> > Sorry, I don't know. I just wanted to point out that there are different
>
> > ways to interpret a date string and that you should make sure that your
> > date string is actually interpreted the way you intend. How you choose
> > to do this is up to you: try it out in your DB (recommended), read docs,
>
> > ask here, ...
> >
> > You could for example try this:
> >
> > select cast ('6.11.2011 08:35:26' as timestamp) from rdb$database
> > select cast ('6.30.2011 08:35:26' as timestamp) from rdb$database
> > select cast ('30.6.2011 08:35:26' as timestamp) from rdb$database
>
> Better just use timestamp '2011-06-30 08:35:26' or cast('2011-06-30
> 08:35:26' as timestamp), which should always work independent of the
> locale
> of the server.
>
And this is... *drumroll* ISO 8601! Yeehaaaw! :-)

Kjell

--
--------------------------------------
Kjell Rilbe
DataDIA AB
E-post: kjell@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64



[Non-text portions of this message have been removed]


==Ticket History==

On Mar 07, 2014 @ 03:29 pm, mark@... wrote:
No Comment.

------
On Mar 07, 2014 @ 03:29 pm, kjell.rilbe@... wrote:
Den 2011-11-09 10:31 skrev canacourse såhär:
>
>
>
> Kjell,
>
> Doesn’t using the dot separator imply that non us date formats are
> being used? i.e. 07/11/2011 is interpreted as MM/DD/YYYY while
> 07.11.2011 is interpreted as DD/MM/YYYY?
>
Sorry, I don't know. I just wanted to point out that there are different
ways to interpret a date string and that you should make sure that your
date string is actually interpreted the way you intend. How you choose
to do this is up to you: try it out in your DB (recommended), read docs,
ask here, ...

You could for example try this:

select cast ('6.11.2011 08:35:26' as timestamp) from rdb$database
select cast ('6.30.2011 08:35:26' as timestamp) from rdb$database
select cast ('30.6.2011 08:35:26' as timestamp) from rdb$database

Kjell


[Non-text portions of this message have been removed]



------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !

Also search the knowledgebases at http://www.ibphoenix.com

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links



------
On Mar 07, 2014 @ 03:29 pm, canacourse@... wrote:
Kjell,

Doesn’t using the dot separator imply that non us date formats are being used? i.e. 07/11/2011 is interpreted as MM/DD/YYYY while 07.11.2011 is interpreted as DD/MM/YYYY?




--- In firebird-support@yahoogroups.com, Kjell Rilbe <kjell.rilbe@...> wrote:
>
> Den 2011-11-09 09:49 skrev canacourse s�h�r:
> >
> > I assume you meant cast ('6.11.2011 08:35:26' as timestamp);? I have
> > tried that but still no records are returned in Ibexpert or ISQL.
> >
> Make sure your string literal is interpreted the way you think. If only
> people would come to their senses and adopt the ISO 8601 standard. *sigh*
>
> For example, does '6.11.2011 08:35:26' result in Nov 6 or June 11?
>
> Kjell
>
>
> [Non-text portions of this message have been removed]
>

------
This is an automated response. Your issue has been noted. We'll be in touch soon.



Please reply to this email or visit the URL below with any additional details.

http://DANTOIN:9675/portal/view-help-request/234




[Non-text portions of this message have been removed]