IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How can i substract 1 year from a column defined as DATE


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
a1javeed

New User


Joined: 10 Dec 2005
Posts: 20
Location: KUWAIT

PostPosted: Tue Jun 27, 2006 7:50 pm
Reply with quote

HI,
How can i substract 1 year from a column defined as DATE using some SQL statements?

thanks in advance
Back to top
View user's profile Send private message
rajandhla

Active User


Joined: 18 Oct 2005
Posts: 182
Location: Luton UK

PostPosted: Tue Jun 27, 2006 8:27 pm
Reply with quote

SELECT
CURRENT DATE - 12 MONTHS
FROM SYSIBM.SYSDUMMY1

Regards,
jai
Back to top
View user's profile Send private message
a1javeed

New User


Joined: 10 Dec 2005
Posts: 20
Location: KUWAIT

PostPosted: Wed Jun 28, 2006 11:21 am
Reply with quote

Hi Jai,
thanks for this, but i want to substract from a column OF TABLE which is defined as DATE !!!!

Regards
Back to top
View user's profile Send private message
a1javeed

New User


Joined: 10 Dec 2005
Posts: 20
Location: KUWAIT

PostPosted: Wed Jun 28, 2006 7:44 pm
Reply with quote

hi Jai

You are right!!!

Before i misunderstood u.But i did check it thru spufi ,It is perfect.

Sorry n Thank u again

Regards
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts How to load to DB2 with column level ... DB2 6
No new posts RC query -Time column CA Products 3
No new posts Need to convert date format DFSORT/ICETOOL 20
Search our Forums:

Back to Top