Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
2 replies Latest Post - ‏2013-10-08T15:28:00Z by Matthew_Simons
sean_johnson
sean_johnson
3 Posts
ACCEPTED ANSWER

Pinned topic Column Map Procedure - Aging a Timestamp

‏2013-09-05T16:40:22Z |

Hi All,

When aging data, I have some specific requirements that must be met. I am using a column map procedure to meet this need. One of my requirements is that the time portion of the source column's timestamp  remain unchanged. I am able to extract all of the necessary components of the timestamp except for the fractions of a second. Extracting fractions of seconds is crucial for my application. Below is my method of extracting the the timestamp from the source column. I have been unable to find any information about extracting fractions of a second. Does Optim Basic provide any way of extracting fractions of a second from the source column's timestamp? Is there a better/more effective way to accomplish my goal, that includes support for fractions of a second? Should I be using an Exit Routine instead of a column map? Is an Exit Routine capable of providing the functionality I need?

 

/* Extract the timestamp from the source column*/

src_year       = Year(column_object.Value)
src_month   = Month(column_object.Value)
src_day        = Day(column_object.Value) 
src_hour      = Hour(column_object.Value)
src_minute  = Minute(column_object.Value)
src_second = Second(column_object.Value)
src_fraction = ???   

 

/* Age the Data */

 adj_date     = DateSerial(src_year + add_years, src_month + add_months, src_day + add_days)       
 adj_time     = TimeSerial(src_hour, src_minute, src_second )        
 adj_datetime = adj_date & " " & adj_time 

 

/* Insert the aged timestamp into the destination column */

Target.Value = adj_datetime

 

Thanks,

Sean

  • sean_johnson
    sean_johnson
    3 Posts
    ACCEPTED ANSWER

    Re: Column Map Procedure - Aging a Timestamp

    ‏2013-09-06T21:44:35Z  in response to sean_johnson

    Update:

    I have written a custom Exit routine and have found that it provides all of the functionality that I was seeking. Custom Exit routines are able to access/alter the timestamp down to a billionth of a second.

     

    Regards,

    Sean 

     

  • Matthew_Simons
    Matthew_Simons
    25 Posts
    ACCEPTED ANSWER

    Re: Column Map Procedure - Aging a Timestamp

    ‏2013-10-08T15:28:00Z  in response to sean_johnson

    Thanks, Sean, for the update - glad you were able to figure it out!