Skip to main content
Dileep_NR
Inspiring
April 17, 2009
Question

Convert UTC to PDT format

  • April 17, 2009
  • 3 replies
  • 3223 views

Hi All,

How can i convert a datetime  in UTC to PDT  format

Please advice

This topic has been closed for replies.

3 replies

Dileep_NR
Dileep_NRAuthor
Inspiring
April 17, 2009

I have field value like this '06:13:34 Apr 02, 2009 PDT"

and have current datetime in UTC. How can i compare the PDT datetime with UTC

April 17, 2009

Would DateConvert("conversion-type", "date") work?

"Description
Converts local time to Coordinated Universal Time (UTC), or UTC to local time. The function uses the daylight
savings settings in the executing computer to compute daylight savings time, if required.

conversion-type

  • local2Utc: Converts local time to UTC time.
  • utc2Local: Converts UTC time to local time.

date

  • Date and time string or a variable that contains one."
Inspiring
April 17, 2009

DateConvert would only work if the server's tz was also PST.

Dileep_NR
Dileep_NRAuthor
Inspiring
April 17, 2009

HI,

i have   a  date value in UTC and have to compare the UTC value to date value  stored in PDT format in Database

Inspiring
April 17, 2009

still not sure what you mean by "PDT format" but assuming it means timezone (tz)

PST/PDT then that CFC should help.

one thing to be careful of is tz hell. what tz is the server in? if the server's

tz has DST & you have datetimes that fall on the cusp of DST, cf will roll those

datetimes over into DST. so test the results.

Inspiring
April 17, 2009

not sure what you mean by "format" but this might help:

http://www.sustainablegis.com/projects/tz/testTZCFC.cfm