Page 1 of 1

Difference between two timestamps fields using sort

PostPosted: Wed May 27, 2009 3:29 pm
by praveen_nayak17
:?: Hi All,

Could anyone help me in calculating the difference between two timestamp(26 char) fields in input file.

Sample input file record
2009-05-25-01.00.00.000000 2009-05-25-05.00.00.123456

Thank you,
Praveen Nayak

Re: Difference between two timestamps fields using sort

PostPosted: Wed May 27, 2009 9:11 pm
by arcvns
Why dont you post a few sample records and the expected output from it?

Re: Difference between two timestamps fields using sort

PostPosted: Wed May 27, 2009 11:45 pm
by praveen_nayak17
Sample input file records
Field 1 Field 2
2009-05-25-01.00.00.000000 2009-05-25-05.00.00.123456
2009-05-25-01.00.00.000000 2009-05-25-05.00.00.123456

expected output file records
2009-05-25-01.00.00.000000 2009-05-25-05.00.00.123456 ( field1-field2)
2009-05-25-01.00.00.000000 2009-05-25-05.00.00.123456 ( field1-field2)


Thank you
Praveen Nayak

Re: Difference between two timestamps fields using sort

PostPosted: Thu May 28, 2009 1:07 am
by dick scherrer
Hello,

Now, please post the actual expected output - not the formula. . . .

Re: Difference between two timestamps fields using sort

PostPosted: Fri May 29, 2009 12:14 am
by praveen_nayak17
expected output file records
field1                          field2                                    field2-field1
2009-05-25-01.00.00.000000 2009-05-25-05.00.00.123456  0000-00-00-04.00.00.123456
2009-05-25-01.00.00.000000 2009-05-25-05.00.00.123456  0000-00-00-04.00.00.123456

Re: Difference between two timestamps fields using sort

PostPosted: Fri May 29, 2009 12:18 am
by Alissa Margulies
SyncSort does not currently have the facility to perform arithmetic on date/time fields.