-
1. Re: Oracle 10g - Date format in SELECT query for CFOUTPUT
Dan Bracuk Jan 28, 2013 12:24 PM (in response to WolfShade)Your coworker is wrong. You don't need to_char. You can select the field and use coldfusion dateformat to display it in the format you want.
-
2. Re: Oracle 10g - Date format in SELECT query for CFOUTPUT
WolfShade Jan 28, 2013 12:46 PM (in response to Dan Bracuk)Does it make a difference if the datatype is TIMESTAMP instead of DATE? (I assumed it was DATE; it's not.) I am having a display issue in CF when just SELECTing the date raw, without formatting it. No error messages, it just stops processing when it gets to the date.
Co-worker indicated that the JDBC connector in CF9 strips the time off the datetime.
^_^
-
3. Re: Oracle 10g - Date format in SELECT query for CFOUTPUT
Adam Cameron. Jan 28, 2013 12:56 PM (in response to WolfShade)How is it erroring without there being an error message?
--
Adam
-
4. Re: Oracle 10g - Date format in SELECT query for CFOUTPUT
WolfShade Jan 28, 2013 12:58 PM (in response to Adam Cameron.)I don't know. All I know is that CF server stops processing when it reaches the date. It gets to the DIV where the date is supposed to be ("<div id="aboutDate">") and goes no further. No closing /div, or anything else.
The webmaster, here, might have some custom error thing in place.
^_^
-
5. Re: Oracle 10g - Date format in SELECT query for CFOUTPUT
Adam Cameron. Jan 28, 2013 1:08 PM (in response to WolfShade)Right. So that's fairly significant information isn't it? The problem doesn't occur when you run the query, it's when you output it.
What do you see when you dump the query out?
How are you trying to output it? You're not giving the date expression a column alias, so what are you referring to it as in your code?
Actually... just post the relevant bits of your code.
--
Adam
-
6. Re: Oracle 10g - Date format in SELECT query for CFOUTPUT
WolfShade Jan 28, 2013 1:21 PM (in response to Adam Cameron.)Please see my original post ("I have a page erroring in production (but not in development) when it gets to a date that it needs to display.") Sorry if it came across as vague. It made sense, to me, when I typed it. But, then, I'm usually typing fast just to get the question out there, when I'm in a hurry.
Haven't done a CFDUMP, yet, as every time I make a change in development that needs to be tested in production, I have to notify my supervisor that there are files that need to be copied into production, which can sometimes take a while, so I try to do troubleshooting on dev side - it's a pain in the you-know-what, but that's the kind of environment I'm working in.
As it turns out, changing the format in the SELECT to_char() did the trick. If anyone else has this issue with Oracle 10g, I'm now using SELECT to_char(create_date,'YYYY/MM/DD HH:MI') FROM tableA, and now the CFOUTPUT is processing the whole page. I guess the MM-DD-YYYY threw CF into a tizzy, breaking the process?
Anyhoo, it's working, now. Thank you, Dan and Adam, for your thoughts on this.
^_^
-
7. Re: Oracle 10g - Date format in SELECT query for CFOUTPUT
Dan Bracuk Jan 28, 2013 3:39 PM (in response to WolfShade)One afternoon, run SELECT to_char(sysdate,'YYYY/MM/DD HH:MI') from dual. Then decide if you picked the appropriate mask for the hours.
-
8. Re: Oracle 10g - Date format in SELECT query for CFOUTPUT
WolfShade Jan 29, 2013 5:52 AM (in response to Dan Bracuk)I'll do that as soon as my dev system is done booting up.
^_^
UPDATE: The query displays 2013/01/29 07:48, which is what I was expecting. But, then, it's before 12 Noon, here. Thanks for pointing that out. HH24 is what it should be.


