Ask a Question related to Macromedia ColdFusion, Design and Development.
-
CFcippa #1
General Problem reading date fields
Hi, I have a problem on my CFMX 6.1 server.
I have this problem reading date fields from a SQLServer200 DB. In the field
there is a value 24/06/2005 and width a cfm page I read 22/06/2005 without
using formatdate function......
p.s.
We are in CH and the OS time Zone is GMT+1
:confused;
CFcippa Guest
-
Crosstab Query with Date Fields
Pulling my hair out! Ok here's what I got: I need to output 2 queries with 2 different datefields with different Years (2 max) in tabular format... -
Sort the table per date or per fields name
Hi alll can anyone tell me how i can make links with one recordset (or more) which each link is gonna sort the etails on the table for example my... -
text input of date and timestamp fields
I'm working on a PHP frontend for a PostgreSQL db and I'm looking for the best way to create date or timestamp inputs. Let's take a date in the... -
Wierd problem reading fields in a tab-delimitted row...
Everyone-- A wierd problem occurs in Ruby 1.67, 1.68 and 1.8 (and probably other versions?): If I step through rows in a tab-delimited text file... -
Problem with putting timestamps in date fields after Fix 10 (DB2 7.2)
Hello out there, why does DB2 7.2 Fix 10 not more allow to put timestamps in date fields. In prior versions the time information was ignored.... -
vkunirs #2
Re: General Problem reading date fields
Hi
can you post your code here...there may a chance of error in reding the db in
your code.
is all the data in your db is having the same date.?
there may chance that you not reading different data and your checking other
date.
vkunirs Guest
-
CFcippa #3
Re: General Problem reading date fields
Hi, tnks for your help, indeed my reading problem was caused by an error in my
select.
But I have a problem similar inserting date from a wddx. I post the code of
the wddx and of my insert page.
In the wddx there is a filed called "DATA_VALORE_NETTO" when I read the wddx,
before I Insert the records I show the date (at row <TD CLASS="grigio-8"
align="right" width="33%">#Data_Valore_netto#</TD>) without formatting it.
Already here I can see that all the dates are less one day (Es. wddx 24/06/2005
--> read before insert 23/06/2005).
I dont' know if the problem could be in the wddx datas where a read a
suspicious value (see the bold) <dateTime>2005-5-31T0:0:0+2:0</dateTime>. But
the OS timezone i setting to +1.
<field name='DATA_VALORE_NETTO'>
<dateTime>2005-6-20T0:0:0+2:0</dateTime>
<dateTime>2005-6-20T0:0:0+2:0</dateTime>
<dateTime>2005-6-20T0:0:0+2:0</dateTime>
<dateTime>2005-6-23T0:0:0+2:0</dateTime>
<dateTime>2005-6-23T0:0:0+2:0</dateTime>
<dateTime>2005-6-23T0:0:0+2:0</dateTime>
<dateTime>2005-6-23T0:0:0+2:0</dateTime>
<dateTime>2005-6-23T0:0:0+2:0</dateTime>
<dateTime>2005-6-22T0:0:0+2:0</dateTime>
<dateTime>2005-6-22T0:0:0+2:0</dateTime>
<dateTime>2005-6-22T0:0:0+2:0</dateTime>
<dateTime>2005-6-22T0:0:0+2:0</dateTime>
<dateTime>2005-6-22T0:0:0+2:0</dateTime>
<dateTime>2005-6-22T0:0:0+2:0</dateTime>
<dateTime>2005-6-20T0:0:0+2:0</dateTime>
<dateTime>2005-6-20T0:0:0+2:0</dateTime>
<dateTime>2005-6-22T0:0:0+2:0</dateTime>
<dateTime>2005-6-22T0:0:0+2:0</dateTime>
<dateTime>2005-6-22T0:0:0+2:0</dateTime>
<dateTime>2005-6-22T0:0:0+2:0</dateTime>
<dateTime>2005-6-22T0:0:0+2:0</dateTime>
<dateTime>2005-6-22T0:0:0+2:0</dateTime>
<dateTime>2005-6-22T0:0:0+2:0</dateTime>
<dateTime>2005-6-22T0:0:0+2:0</dateTime>
<dateTime>2005-6-22T0:0:0+2:0</dateTime>
<dateTime>2005-6-22T0:0:0+2:0</dateTime>
<dateTime>2005-5-31T0:0:0+2:0</dateTime>
<dateTime>2005-5-31T0:0:0+2:0</dateTime>
<dateTime>2005-5-31T0:0:0+2:0</dateTime>
<dateTime>2005-5-31T0:0:0+2:0</dateTime>
<dateTime>2005-5-31T0:0:0+2:0</dateTime>
<dateTime>2005-5-31T0:0:0+2:0</dateTime>
<dateTime>2005-5-31T0:0:0+2:0</dateTime>
<dateTime>2005-5-31T0:0:0+2:0</dateTime>
<dateTime>2005-5-31T0:0:0+2:0</dateTime>
<dateTime>2005-5-31T0:0:0+2:0</dateTime>
<dateTime>2005-5-31T0:0:0+2:0</dateTime>
<dateTime>2005-5-31T0:0:0+2:0</dateTime>
<dateTime>2005-5-31T0:0:0+2:0</dateTime>
<dateTime>2005-6-20T0:0:0+2:0</dateTime>
<dateTime>2005-6-22T0:0:0+2:0</dateTime>
<dateTime>2005-5-31T0:0:0+2:0</dateTime>
<dateTime>2005-5-31T0:0:0+2:0</dateTime>
<dateTime>2005-6-21T0:0:0+2:0</dateTime>
<dateTime>2005-6-22T0:0:0+2:0</dateTime>
<dateTime>2005-6-21T0:0:0+2:0</dateTime>
<dateTime>2005-6-21T0:0:0+2:0</dateTime>
<dateTime>2005-5-31T0:0:0+2:0</dateTime>
</field>
<CFDIRECTORY ACTION="LIST" DIRECTORY="#mydb_wddx_path#" FILTER="t_fondo.wddx"
NAME="list_t_fondo">
<CFIF LIST_t_fondo.RECORDCOUNT EQ 1>
<CFSET WDDX_PRESENT="yes">
<CFELSE>
<CFSET WDDX_PRESENT="no">
</CFIF>
<CFIF WDDX_PRESENT EQ "yes">
<CFFILE ACTION="read" FILE="#mydb_wddx_path#t_fondo.wddx"
VARIABLE="thisWDDX"/>
<CFWDDX ACTION="wddx2cfml" INPUT="#thisWDDX#" OUTPUT="wddx_t_fondo"/>
<H1>Insert wddx<CFOUTPUT>#dateformat(now(),'dd/mm/yyyy')#
#timeformat(now(),'hh:mm:ss')#</CFOUTPUT></H1>
<TABLE BORDER="0" CELLPADDING="2" CELLSPACING="1" width="100%">
<CFOUTPUT QUERY="wddx_t_fondo">
<TR>
<TD CLASS="grigio-8" width="25%">#NumValore#</TD>
<TD CLASS="grigio-8" width="25%">#tipo#</TD>
<TD CLASS="grigio-8" align="right" width="33%">#Data_Valore_netto#</TD>
<CFIF Tipo NEQ "yield Enhancer" and tipo neq "directional" and tipo neq
"event driven">
<CFTRY>
<CFQUERY DATASOURCE="#db_to#">
update t_fondo
set
ordine=#ordine#,
Nome='#Nome#',
Valuta='#Valuta#',
Valore_netto=#Valore_netto#,
Data_Valore_netto=#createodbcdate(Data_Valore_nett o)#,
Tipo='#Tipo#',
Tipo_E='#Tipo_E#',
Domicilio='#Domicilio#',
Domicilio_E='#Domicilio_E#',
Patrimonio=#Patrimonio#,
Patrimonio_chf=#Patrimonio_chf#,
nParti=#nParti#,
Commento='#Commento#',
Commento_E='#Commento_E#',
Dom_Autoriz='#Dom_Autoriz#',
Dom_fondo='#Dom_fondo#',
Freque_NAV_I='#Freque_NAV_I#',
Freque_NAV_E='#Freque_NAV_E#',
Note_I='#Note_I#',
Note_E='#Note_E#',
All_In_Fee='#All_In_Fee#',
Benchmark='#Benchmark#',
Profilo_I='#Profilo_I#',
Profilo_E='#Profilo_E#',
Profilo_D='#Profilo_D#',
Profilo_F='#Profilo_F#'
<!--- ,perftd=#perftd#--->
where NumValore='#NumValore#'
</CFQUERY>
<TD CLASS="green-8" width="25%">Record inserted</TD>
<CFCATCH>
<TD CLASS="red-8" width="25%">REcord not inserted</TD>
</CFCATCH>
</CFTRY>
<CFELSE>
<TD CLASS="orange-8" width="25%">Fund Type not for internet</TD>
</CFIF>
</TR>
</TR>
</CFOUTPUT>
</TABLE>
<CFELSE>
<H1>Insert wddx mydb site</H1>
<TABLE BORDER="0" CELLPADDING="2" CELLSPACING="1">
<TR>
<TD CLASS="red-9" WIDTH="500">WDDX not found</TD>
</TR>
</TABLE>
</CFIF>
CFcippa Guest



Reply With Quote

