If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Sybase > Enable date and time data types

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-14-11, 17:15
hcorzo hcorzo is offline
Registered User
 
Join Date: Apr 2011
Posts: 3
Enable date and time data types

Good afternoon.

We need to use the time and date types added in ASE 12.5.1 in a existent database schema. Below the results of querying systypes in master and finance (the schema in which we need the additional data types)

use master
go

select name from systypes where name in ('time','date')

use finance
go

select name from systypes where name in ('time','date')


name
------------------------------
date
time

(2 row(s) affected)

name
------------------------------

(0 row(s) affected)

What can we do in order to enable the date and time data types in my finance schema?. Thanks in advance.

Héctor
Reply With Quote
  #2 (permalink)  
Old 04-15-11, 03:30
Martijnvs Martijnvs is offline
Registered User
 
Join Date: Jan 2004
Location: The Hague/Utrecht, NL
Posts: 415
The standard datatypes in master..systypes should be available in every database in the instance. The finance..systypes table can hold additional userdefined datatypes.

What result does select * from fincance..systypes give?
__________________
I'm not crazy, I'm an aeroplane!
Reply With Quote
  #3 (permalink)  
Old 04-25-11, 10:29
hcorzo hcorzo is offline
Registered User
 
Join Date: Apr 2011
Posts: 3
Thanks for your reply.

The result of executing select * from finance..systypes is attached.

Héctor
Attached Files
File Type: txt systypes.txt (17.8 KB, 31 views)
Reply With Quote
  #4 (permalink)  
Old 04-26-11, 03:27
Martijnvs Martijnvs is offline
Registered User
 
Join Date: Jan 2004
Location: The Hague/Utrecht, NL
Posts: 415
Ah, this is interesting. I checked in my own ASE12.5.1-server, and I get the very same results. To be honest, I don't know how or why this is, and no idea where the date and time datatypes come from.
You could use theexisting datetime-datatype in your userdb, and use a datetime-convert, or trim to extract the desired part of the datetimevalue.
__________________
I'm not crazy, I'm an aeroplane!
Reply With Quote
  #5 (permalink)  
Old 04-26-11, 16:37
hcorzo hcorzo is offline
Registered User
 
Join Date: Apr 2011
Posts: 3
Well... an application was developed in an environment with date and time data types available, so we will need to modify the source code then in order to use it in the new environment without them. Anyway... thank you very much for your help.

Best regards...

Héctor
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On