spacer
spacer search

i-Vibe.com
developer resource & tips portal

Search
spacer
Newsflash
01/27/06: I just had some time to cleanup this website. I will add more articles for AJAX this coming weekend.
 
splash.jpg
Main Menu
Home
Articles
Programming
Networking/Security
Data Modeling
Interface Design
Developer News
Downloads
Links
Login





Lost Password?
No account yet? Register
Related Articles
 
Home arrow Data Modeling arrow ETL DataStage arrow ETL DataStage : Parallel Job Date Operation
JoomlaHacks.com
ETL DataStage : Parallel Job Date Operation Print E-mail
  • Currently 4.0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Rating: 4.0/5 (7 votes cast)

Written by Roceller Alvarez   
Monday, 13 March 2006
This is a quick tip on how you would do date operation in a Parallel Extender job. The date needs to be converted first to Julian date which is an integer, then convert back to date after doing the mathematical operation.

Example:

DateFromJulianDay(JulianDayFromDate(CurrentDate()) - 1)


JulianDayFromDate - Returns julian day from the given date.
Argument: date
Returns: julian date (int32)

DateFromJulianDay - Returns a date from the given julian date.
Argument: julian date (int32)
Returns: date


Date and Time Functions:

Name

Description

Arguments

Output

DateFromDaysSince

Returns a date by adding an integer to a baseline date

number (int32)[baseline date]

date

DateFromJulianDay

Returns a date from the given julian date

juliandate (uint32)

date

DaysSinceFromDate

Returns the number of days from source date to the given date

source_date given_date

days since (int32)

HoursFromTime

Returns the hour portion of a time

time

hours (int8)

JulianDayFromDate

Returns julian day from the given date

date

julian date (int32)

MicroSecondsFromTime

Returns the microsecond portion from a time

time

microseconds (int32)

MinutesFromTime

Returns the minute portion from a time

time

minutes (int8)

MonthDayFromDate

Returns the day of the month given the date

date

day (int8)

MonthFromDate

Returns the month number given the date

date

month number (int8

NextWeekdayFromDate

Returns the date of the specified day of the week soonest after the source date

source_date day_of_week (string)

date

PreviousWeekdayFromDate

Returns the date of the specified day of the week most recent before the source date

source_date day_of_week (string)

date

SecondsFromTime

Returns the second portion from a time

time

seconds (dfloat)

SecondsSinceFromTimestamp

Returns the number of seconds between two timestamps

timestamp base_timestamp

seconds (dfloat)

TimeDate

Returns the system time and date as a formatted string

-

system time and date (string)

TimeFromMidnightSeconds

Returns the time given the number of seconds since midnight

seconds (dfloat)

time

TimestampFromDateTime

Returns the timestamp from the number of seconds from the base timestamp

seconds (dfloat)[base timestamp]

timestamp

TimestampFromSecondsSince

Returns the timestamp from the number of seconds from the base timestamp

seconds (dfloat) [base timestamp]

timestamp

TimestampFromTimet

Returns a timestamp from the given unix time_t value

timet (int32)

timestamp

TimetFromTimestamp

Returns a unix time_t value from the given timestamp

timestamp

timet (int32)

WeekdayFromDate

Returns the day number of the week from the given date

date

day (int8)

YeardayFromDate

Returns the day number in the year from the given date

date

day (int16)

YearFromDate

Returns the year from the given date

date

year (int16)

YearweekFromDate

Returns the week number in the year from the given date

date

week (int16




 
< Prev   Next >
spacer
 
spacer