Firebird SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
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 November 16th, 2006, 03:14 AM
FrankBKK FrankBKK is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Posts: 3 FrankBKK User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 25 m 48 sec
Reputation Power: 0
How to calculate with dates in a stored procedure ?

This one works fine:
pbxWAIT_TIME_LAST =
CURRENT_TIMESTAMP - odCREATED_AT ;

On this one
pbxSTATUS_COUNTDOWN =
CURRENT_DATE - odDELIVERY_DATE ;

i get an
ISC-Error 335544606 - expression eval not supported

pbxXXXXX vars are defined as Integer
odCREATED_AT is defined as timestamp
odDELIVERY_DATE is defined as date

FB Dialect 3

Any hints please ???

=> I just found it by my own that
you can not use CURRENT_DATE
but CURRENT_TIMESTAMP will do the job anyway ...

Reply With Quote
  #2  
Old November 29th, 2006, 04:06 PM
kocaşahan kocaşahan is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2006
Location: Turkey
Posts: 2 kocaşahan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 3 m 28 sec
Reputation Power: 0
Hi,you can try

pbxSTATUS_COUNTDOWN =cast (CURRENT_DATE - odDELIVERY_DATE as integer) ;

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > How to calculate with dates in a stored procedure ?


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 | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT