Firebird SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsDatabasesFirebird SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 24th, 2011, 02:02 PM
summ0ner summ0ner is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2009
Posts: 14 summ0ner User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 40 m 58 sec
Reputation Power: 0
Cast from datetime to date does nothing

I am trying to cast datetime to date using the following

select log.lid, cast(log.ldate as date), log.clid, log.staid, log.emid
from tblclientlog_oes log

Resulting date comes back as datetime. Is firebird cast broken and cannot distinguish a difference between date and datetime? if so, what would be some other ways to do it.

Reply With Quote
  #2  
Old June 26th, 2011, 01:50 AM
costin_mentor costin_mentor is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2007
Posts: 31 costin_mentor User rank is Lance Corporal (50 - 100 Reputation Level)costin_mentor User rank is Lance Corporal (50 - 100 Reputation Level)costin_mentor User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 13 h 12 m 34 sec
Reputation Power: 7
I have no problem to convert datetime to date this way.
I tried both with IBExpert and with isql.
How did you tried it?

Reply With Quote
  #3  
Old June 27th, 2011, 09:57 AM
summ0ner summ0ner is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2009
Posts: 14 summ0ner User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 40 m 58 sec
Reputation Power: 0
Firebird version 1.5.
IBexpert version 2005.06.07.

1/18/2008 7:43:07 AM

This is the resulting date after cast from datetime to date.

Reply With Quote
  #4  
Old June 28th, 2011, 12:49 AM
costin_mentor costin_mentor is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2007
Posts: 31 costin_mentor User rank is Lance Corporal (50 - 100 Reputation Level)costin_mentor User rank is Lance Corporal (50 - 100 Reputation Level)costin_mentor User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 13 h 12 m 34 sec
Reputation Power: 7
Quote:
Originally Posted by summ0ner
Firebird version 1.5.
IBexpert version 2005.06.07.

1/18/2008 7:43:07 AM

This is the resulting date after cast from datetime to date.

My version of Firebird is 2.1.3.
Have you try it with isql from command line?

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > Cast from datetime to date does nothing

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap