• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cfpop date issues

Guest
Nov 07, 2008 Nov 07, 2008

Copy link to clipboard

Copied

Hello all,

I'm writing a small app that will display a user's email on a "dashboard". Everything is working pretty good except the date/time. I've used the ParseDateTime() function, but the time usually comes out completely wrong.

I just sent (1:00 pm CST) myself an email and the date that appears is as follows:

Fri, Nov 07, 2008 - 06:58:05PM when using ParseDateTime [#DateFormat(ParseDateTime(my_sorted_email.date,"pop"),"ddd, mmm dd, yyyy")# ]

Fri, 7 Nov 2008 10:58:05 -0800 (PST) when displayed without parsing. [#my_sorted_email.date#]

Can anyone offer any suggestions?

Thanks,
Robert

TOPICS
Advanced techniques

Views

314

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 11, 2008 Nov 11, 2008

Copy link to clipboard

Copied

I believe the argument "pop" in ParseDateTime() returns a conversion to GMT. Try substituting that with "standard":

#DateFormat(ParseDateTime(my_sorted_email.date,"standard"),"ddd, mmm dd, yyyy")#

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 12, 2008 Nov 12, 2008

Copy link to clipboard

Copied

LATEST
robs67,

That helped, but it still didn't convert to my time zone (CST). After more searching, I came across this:

http://www.petefreitag.com/item/569.cfm

It has solved my case; at least for the time being. I may have to tweak it some if I come across an unusual format.

Thanks for the suggestion.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation