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

queryNew date and time type only precise to the second?

Valorous Hero ,
Nov 10, 2011 Nov 10, 2011

Copy link to clipboard

Copied

I am creating a set or query using queryNew() functionality to split up a larger query into related parts.  One of the fields in the larger query is a date-time filed with millisecond data that is relevant to proplerly sort the records.  Apparently the date and time data types of the queryNew() function are precise to only the second and is truncating the necessary millisecond data.

First question is there any way to change this behavior and have the queryNew() date and|or time data types be more precise.

TOPICS
Advanced techniques

Views

1.4K

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

correct answers 1 Correct answer

Guide , Nov 10, 2011 Nov 10, 2011

Oh, plus I'm a muppet. Use "timestamp" as the data type.

Votes

Translate

Translate
Guide ,
Nov 10, 2011 Nov 10, 2011

Copy link to clipboard

Copied

QueryNew() does support 64-bit integers ("BigInt") - how about storing the dates as milliseconds since 1970 or something like that? Would obviously require a couple of conversion functions but would get around your issue here.

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
Guide ,
Nov 10, 2011 Nov 10, 2011

Copy link to clipboard

Copied

Oh, plus I'm a muppet. Use "timestamp" as the data type.

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
Valorous Hero ,
Nov 10, 2011 Nov 10, 2011

Copy link to clipboard

Copied

Thanks Owain.

It would be nice if timestamp was listed in the documentation online as an option, then I would have already tried it on my own.

Ian

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
Guide ,
Nov 10, 2011 Nov 10, 2011

Copy link to clipboard

Copied

Sure would, looked online and was only date and time. However mess up the syntax and the error message tells you timestamp is an option.

Ridiculous.

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
LEGEND ,
Nov 10, 2011 Nov 10, 2011

Copy link to clipboard

Copied

http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7f94.html

It's in the footnotes.

But, yeah, would be better if Adobe got it right and didn't rely on people to correct their own docs for them.  That footnote from Paul has been there for over a year... and I know those posts are moderated by the people who maintain the docs.  How lazy is it to not correct them even when someone's taken the time to point the correction out to them!

--

Adam

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
Valorous Hero ,
Nov 10, 2011 Nov 10, 2011

Copy link to clipboard

Copied

That'll teach me to not check all versions of the documentation and scroll down to the bottom of each one to find ALL the possible options of any tag and|or function.

Sheesh silly me.

I started with the CF8 version of the function documentation because that often comes up first in Google searches for just a tag or function name.

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
LEGEND ,
Nov 10, 2011 Nov 10, 2011

Copy link to clipboard

Copied

Heh.  And "g'day Ian", btw.  You don't seem to have been around here much recently?

I have this URL bookmarked:

http://www.google.co.uk/search?hl=en&q=site%3Ahttp%3A%2F%2Fhelp.adobe.com%2Fen_US%2FColdFusion%2F9.0...

And I browse to it and stick whatever I want at the end of it.  That way I stick to the CF9 docs.  I find the CF9 docs site quite a lot quicker than the CF8 ones.  That and it's more relevant to me (as we've finally migrated to CF9).

It does seem odd (and annoying) that the old CF8 docs have been indexed by Google better than the CF9 docs have been.

--
Adam

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
Valorous Hero ,
Nov 10, 2011 Nov 10, 2011

Copy link to clipboard

Copied

LATEST

I don't get the Adobe forum emails to my day-in-day-out email address anymore. 

So unless I have a reason and|or enough boredome to come to the website to seek help or those that need help, I don't get around here very often these days.

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