how to get the no of days between two dates

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
uppalapati2003
Participant
Posts: 70
Joined: Thu Nov 09, 2006 2:14 am

how to get the no of days between two dates

Post by uppalapati2003 »

Hi all,

i have to columns(defaultdate,current date ) i want to get difreence between these two columns .output column is days the datatype of this field id smallint..if any body have some idea please let me know

thanks
Srini
koolnitz
Participant
Posts: 138
Joined: Wed Sep 07, 2005 5:39 am

Post by koolnitz »

JulianDayFromDate(defaultdate) - JulianDayFromDate(CurrentDate())

OR

Use DaysSinceFromDate() function.
Nitin Jain | India

If everything seems to be going well, you have obviously overlooked something.
uppalapati2003
Participant
Posts: 70
Joined: Thu Nov 09, 2006 2:14 am

Post by uppalapati2003 »

Thanks KoolNitz
Srini
uppalapati2003
Participant
Posts: 70
Joined: Thu Nov 09, 2006 2:14 am

Post by uppalapati2003 »

Thanks KoolNitz
Srini
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

How about DaysFromDateSince() function?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply