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 

Search found 3 matches
MVSFORUMS.com Forum Index
Author Message
  Topic: convert a date column from yyyynnn format to yyyy-mm-dd
moose

Replies: 2
Views: 1970

PostForum: Database   Posted: Wed Aug 20, 2003 4:14 pm   Subject: convert a date column from yyyynnn format to yyyy-mm-dd
sorry!that should be SELECT DATE(SUBSTR(DIGITS(date_field),a,b))
  Topic: convert a date column from yyyynnn format to yyyy-mm-dd
moose

Replies: 2
Views: 1970

PostForum: Database   Posted: Wed Aug 20, 2003 4:12 pm   Subject: convert a date column from yyyynnn format to yyyy-mm-dd
hello,
found the solution to that question.
SELECT DATE(SUBSTR(DATE(date_field),a,b))
FROM TABLE
this converts yyyynnn to yyyy-mm-dd
thanks
  Topic: convert a date column from yyyynnn format to yyyy-mm-dd
moose

Replies: 2
Views: 1970

PostForum: Database   Posted: Wed Aug 20, 2003 2:16 pm   Subject: convert a date column from yyyynnn format to yyyy-mm-dd
How do I convert a date column in a db2 table from yyyynnn format to yyyy-mm-dd format from within an sql query so that the column displays as yyyy-mm-dd?
I understand the DATE and SUBSTR functions n ...
 
Page 1 of 1
All times are GMT - 5 Hours
Jump to:  


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group