Question Krishnaveni Kapu · Jun 20, 2023

convert "dd/MMM/yy" to "YYYYmmdd"

I need to convert "dd/MMM/yy" to "YYYYmmdd".

Input = dd/MMM/yy

Output = YYYYmmdd

example

Input = 13/Jun/23

Output = 20230613

I used below , I get 1923 as year but I need 2023.

$ZDATE($ZDATEH("13/Jun/23",8),8) = 19230613

Product version: IRIS 2022.1

Comments

Krishnaveni Kapu · Jun 20, 2023

Its resolved :

..ConvertDateTime("09/Jun/23 09:40:00 BST","%d/%b/%y %H:%M:%S BST","%Y%m%d%H%M%S")    

output = 20230609094000

0
Lorenzo Scalese · Jun 20, 2023

Hello, 

following the documentation of the argument yearopt  , you can do : 

Write$ZDATE($ZDATEH("13/Jun/23",8,,6),8)
6 Represent all dates in the current century with two-digit years and all other dates with four-digit years.
0