I.T. Discussion Community!
-Collapse +Expand
DBA
Search DBA Group:

Advanced
-Collapse +Expand DBA Store
PRESTWOODSTORE

Prestwood eMagazine

June Edition
Subscribe now! It's Free!
Enter your email:

   ► MB LobbyDBA, Databases, & Data BoardInterbase Topic   Print This     

Interbase

Alan
 (Inactive)
Brisbane Australia
I am using an older version of Interbase (ie 5.1 I think). I would like to use it to manipulate both dates and times. I had a lot of trouble understanding the online manual.

Are there any examples of how to do this in a stored procedure? Also is there a TIME datatype in Interbase?

Thanks for your help.

Alan
 Posted 17 years ago (Thread Starter)
Comment Quote
About Alan -Collapse +Expand
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #6503, 1 replies
Thread Started 6/5/2002 8:38:00 AM
View Counter=2168
Location=Brisbane Australia  
Joined=17 years ago   MB Posts=2  
Most Recent Post
Scott Wehrly
Prestwood IT
 (Inactive)
Las Vegas, NV USA
I remember having this problem several years ago. The answer is somewhere in my ancient code archives.



First, in Versions 5x of InterBase (5.0 through 5.6) there is no TIME data type.



What I remember is that the DATE fields are stored as a floating point number, with the whole portion of the value representing the actual DATE, and the fractional portion representing the TIME.



So, I remember I played around in WISQL until I could derive just the TIME portion by subtracting the same MMDDYYY value with a time of zero (i.e. midnight) from a DATE field, and CAST()ing the result as a floating point number, giving me the TIME portion.



If I just wanted to display the TIME value, I'd CAST the entire DATE as a "MMDDYYYYHH:MI:SS" VARCHAR value, and strip off the first 8 characters.
 Posted 17 years ago
Comment Quote
About Scott Wehrly -Collapse +Expand
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Old Account!
If this is your account, sign in to activate web presence data (sign in quarterly to keep active). Alternatively, you can subscribe to our monthly eMag with a valid email address.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #6526 (Level 1.1)  Reply to 6503
Thread Started 6/5/2002 2:11:00 PM
View Counter=2
Location=Las Vegas, NV USA 
Joined=17 years ago   MB Posts=442   KB Posts=19  

Revive Thread!

Add a comment to revive this old thread and make this archived thread more useful.

Write a Comment...
Full Editor
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1194A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #6503 Counter
2168
Since 4/2/2008
Follow PrestwoodBoards on: 


©1995-2019 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech