Your time transformation isn't quite right. You need to tell it that it is coming in in 12 hour format but you want it out in 24 hour format. Try this:
What happens when it's 10 PM? Let's say the time is 10:18:19 PM - what happens when you take the right 10 characters? Same with the dates - months and days can be a single digit or two digits in your format.
Better to use the field command to split it, not a fixed substring. Tell it that the field is 'space delimited' and you want the 'fields' on either side of that first space:
stgvar1 gets the first field while stgvar2 gets 'all' of the fields after the first one. Give that a shot.
ps. I'd strongly suggest you try to use more descriptive stage variable names, that will help to make your derivations more 'self documenting'. stgvar1 and stgvar2 mean nothing but svTimestampDate and svTimestampTime (as an example) do.
-craig
"You can never have too many knives" -- Logan Nine Fingers
I tried using the field function as you suggested but the result is only date 2007-02-24 in the flatfile.
As we needed the file to be loaded in the oracle table yesterday , i used sysdate to populate into Create_date field . This is a one time job as per requirement and Create_date field is not a critical field for the business.
Business may not be interested to know why the actual Create_date values coming from Flatfile were not loaded ( as it is a Batch process timestamp) but i am very much interested to know how to solve this issue.
Huh... there's no reason that I can see here why the techniques posted wouldn't work as this is pretty standard timestamp work.
Can you repost (since it has been through some modifications) exactly how you are doing this now? Cut and paste from the job things like the stage variable derivations, the derivation for the flat file field you are writing to, how that field is defined and some samples of input and output data?
I'd also suggest you write the two stage variables to separate fields in the flat file as well as the 'concatenated' value for diagnostic purposes.
-craig
"You can never have too many knives" -- Logan Nine Fingers
All that's working. But when you create a timestamp, you don't want the AM/PM designator. Your derivation for Create_Date is correct, unless there's a newline in it. It must be on a single line. For example (for an ISO 8601 timestamp):
You should also create two more stage variables and add them to the diagnostic file. We know you are parsing the input string correctly but nothing else for certain. Do the conversions in the stage variables and just the concatenation in the final derivation.
Ok, that wasn't so hard to figure out. Built a small testbed routine to check the conversions and found that it doesn't like the space in the time before the AM/PM part. Silly Wabbit.