You are not logged in.
Announcement
Unanswered posts
|
Pages: 1

I know RIGHT and LEFT commands, my question is: how can I get a string part that's into the string?
I have "12-34-5678", I wanna get "34".
I need to do this, because I retrieve a 'date' from SQL server with "dd-MM-yyyy" pattern, but I need to do 2 things:
1 - put the date as "yyyy-MM-dd"
2 - check if the date is null (I need to do the logic of the following code: row1.DATE_FIELD == null ? "0001-01-01" : row1.DATE_FIELD)
Input is SQL Server table and Output is a tFileOutputPositional.
Thank about the answer
---------ADD----------
I've tried the following code, but I had an error building job:
row2.DATA_CESSAZIONE == null ? "2999-12-31" :
RIGHT(row2.DATA_CESSAZIONE,4)
+"-"
+RIGHT(LEFT(row2.DATA_CESSAZIONE,5),2)
+"-"
+LEFT(row2.DATA_CESSAZIONE,2)
Last edited by ienax_ridens (2012-02-21 16:43:26)
Offline

Solution found:
Table --> tMap1 (change of date pattern "dd-MM-yyyy" to "yyyy-MM-dd") --> tConvert (date to string) --> tMap2 --> tFileOutputPositional
I think this could help someone.
bye
Offline
Pages: 1