MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Smalldatetime

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
Param
Beginner


Joined: 31 Mar 2003
Posts: 16
Topics: 7

PostPosted: Thu Nov 13, 2003 1:52 am    Post subject: Smalldatetime Reply with quote

Hi folks,
What is the cobol equivalent of DB2 data type 'Smalldatetime'

Thnx in advance,
Param
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Nov 13, 2003 6:23 am    Post subject: Reply with quote

Param,

As far as I know DB2 on mainframe does not have data type SMALLDATETIME. Which version of DB2 are you using?

I Know sql server and sybase have smalldatetime data types.


Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Param
Beginner


Joined: 31 Mar 2003
Posts: 16
Topics: 7

PostPosted: Thu Nov 13, 2003 6:27 am    Post subject: Reply with quote

Kolusu,
I am extremely sorry...This was not in DB2...Actually it was in SQL...


Thnx,
Param
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Nov 13, 2003 6:43 am    Post subject: Reply with quote

param,

In Sql Server ,the smalldatetime data type stores dates and times of day with less precision than datetime. SQL Server stores smalldatetime values as two 2-byte integers. The first 2 bytes store the number of days after January 1, 1900. The other 2 bytes store the number of minutes since midnight. Dates range from January 1, 1900, through June 6, 2079, with accuracy to the minute.

Basically smalldatetime is stored in 2 parts of 2 byte integers which is equivalent to smallint in DB2.

I suggest that you define 2 columns with data type smallint

The first column would have the number of days. The second column would have number of minutes since midnight.

Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group