system
1
Hi Experts,
I have source table with column persistent_date and data was like this
persistent_date
January 2025
February 2025
’
’
December 2025
But I want output like below
persistent_date
01- 2025
02- 2025
’
’
12-2025
Thanks,
Venki
ursfriend77 (BOB member since 2011-03-02)
system
2
Lots of different ways to solve that. Here is one:
print('January 2025');
print(to_char(to_date(word_ext('January 2025', 1, ' ') || ' 01 ' || word_ext('January 2025', 2, ' '), 'MONTH DD YYYY'), 'MM-YYYY'));
Output:
10852 9332 PRINTFN 3/27/2017 2:55:58 PM January 2025
10852 9332 PRINTFN 3/27/2017 2:55:58 PM 01-2025
eepjr24
(BOB member since 2005-09-16)
system
3
Hi,
You can also use the following:
to_char( to_date(persistent_date,‘Month YYYY’),‘MM-YYYY’)
Regards,
Jayant
Jay_mKumar
(BOB member since 2016-03-24)