Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Convert SignedDate to String

Avatar

Level 7

How is it possible to convert the Signed Time from the PDFSignatureVerificationResult field to String, in workbench? When I assign the value to a string variable I get the zulu time.

Below is the example..

SignedTime = Thu Dec 09 15:52:48 EST 2010

String Value = 2010-12-09T20:52:48Z

Aditya

6 Replies

Avatar

Former Community Member

Hi . You can use substring and concatenate functions to achieve your goal.

For example

a=substring(SignedTime, 24, 4) Result= 2010

b=substring(SignedTime, 20, 4) Result=EST

and then use concatenate for 

concat(a,"-",b,"-") result 2010-EST-

Avatar

Level 7

Substring doesn't seem to generate any value...

My intention is to insert the value in a database using a custom script. All this while, I have inserted the date as a string. However, converting this to a string gives me the zulu value.

Aditya

Avatar

Former Community Member

Hİ my friend I got it now .

there is also date time format command which allows you to change datetime as you desired.

Avatar

Level 7

Maybe you can help me..... I am unable to get it to work. Have you used it before? Can you send me an example of how the parameters are used?

Aditya