Quantcast
Channel: SCN : Unanswered Discussions - Data Services and Data Quality
Viewing all articles
Browse latest Browse all 3719

Year date formatting in BO Data Services

$
0
0

Hi guys,

 

I have a column with different timestamps, like:

5771.10.04 16:07:23.800913000

0967.06.17 06:20:28.800906000

3857.06.18 03:49:03.800906000

01.04.29 16:45:04.400909000

 

I need to convert these into a decimals (which I use for a join of some million rows), like so:

57711004160723800913

9670617062028800906

38570618034903800906

10117121104600914

 

And I do this using this function (which is already time-intensive as it is):

cast(  substr(to_char($timestamp,'YYYYMMDDHH24MISSFF'),1,20),  'decimal(20,0)');

 

The problem is the last timestamp, which only has two digits for the year, where the YYYY conversion occures. I would need the 01 to be transformed into 0001, instead it is transformed into 2001.

 

Any ideas how I could solve this in a quick/non-intensive way?

 

Tl;dr I need to transform the year 01 into 0001 instead of 2001 in BODS.


Viewing all articles
Browse latest Browse all 3719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>