How to write correctly write datetime

I wrote the code but there is a syntax error, how to write correctly


need to output like this - 



22.07.2020 19:25:57 - 23.07.2020 18:06:28

Solution

Hi there,


You just need to apply these for your 2 dates:

FormatDateTime(Date1, "dd.MM.yyyy HH:mm:ss") + " - " + FormatDateTime(Date2, "dd.MM.yyyy HH:mm:ss")

So in your case:


FormatDateTime(GetCreditBureauResponse.List.Current.CreditBureauResponse.RequestDateTime, "dd.MM.yyyy HH:mm:ss") + " - " + FormatDateTime(GetCreditBureauResponse.List.Current.CreditBureauResponse.ResponseDateTime, "dd.MM.yyyy HH:mm:ss").


Hope it helps.


Cheers,

João

Solution

João Marques wrote:

Hi there,


You just need to apply these for your 2 dates:

FormatDateTime(Date1, "dd.MM.yyyy HH:mm:ss") + " - " + FormatDateTime(Date2, "dd.MM.yyyy HH:mm:ss")

So in your case:


FormatDateTime(GetCreditBureauResponse.List.Current.CreditBureauResponse.RequestDateTime, "dd.MM.yyyy HH:mm:ss") + " - " + FormatDateTime(GetCreditBureauResponse.List.Current.CreditBureauResponse.ResponseDateTime, "dd.MM.yyyy HH:mm:ss").


Hope it helps.


Cheers,

João

 i have error

 

Sorry, i wrote it with an error.


It should be GetCreditBureauResponses, I forgot the s.


Cheers,

João

It was on writing by head :D

Anyway, I am glad you were able to solve your issue.


Cheers,

João 

Hello kan2332

This is way to change date time format --

FormatDateTime(CurrDateTime(), "dd.MM.yyyy HH:mm:ss") + " - " + FormatDateTime(CurrDateTime(), "dd.MM.yyyy HH:mm:ss")


Please try this --

addMapElementToList(Map, getMapElement("ContractDate",

FormatDateTime(GetCreditBureauResponse.List.Current.CreditBureauResponse.RequestDateTime, "dd.MM.yyyy HH:mm:ss") + "-" + FormatDateTime(

GetCreditBureauResponse.List.Current.CreditBureauResponse.ResponseDateTime, "dd.MM.yyyy HH:mm:ss")))


Thanks,

Vipin Yadav