Ask a Question

How to convert IST to EST dates

lkalli
New Contributor

How to convert IST to EST dates

I need help to convert IST dates to EST. I tried using below syntax but i am getting error as incorrect format string. current = aqDateTime.Now(); aqConvert.DateTimeToFormatStr(current, "%m/%d/%Y %I:%M:%S %est")
3 REPLIES 3
rraghvani
Valued Contributor

What is %est ? As it's not defined in Date and Time Format Specifiers.

its like %z - Timezone abbrevation. I tried EST as time zone name.

rraghvani
Valued Contributor

This is the correct usage

function tes()
{
    var current = aqDateTime.Now();
    Log.Message(aqConvert.DateTimeToFormatStr(current, "%d %b %Y %I:%M:%S %p %z"));
}

and to perform the "conversion", see https://stackoverflow.com/questions/16805806/conversion-of-time-zone-from-est-to-ist-using-java-scri... and you should be able to perform the same.

cancel
Showing results for 
Search instead for 
Did you mean: