RE: [flexcoders] Datefield inconsistencies? Or is it just me!

2007-03-06 Thread Peter Farland
Correct Gordon and Shannon, the cause is that when ColdFusion serializes
a Date (or whatever the Java type ends up in the result of the CFQUERY)
it converts the value into SOAP using the XML Schema dateTime as it
would be in the UTC timezone (you can tell as it appends a Z suffix to
tell the client that it is in zulu time, i.e. UTC,). When the client
deserializes the value into an ActionScript Date, it does so in UTC as
matching the value sent by the server (so it really is referring to the
same moment in time), but then when you access the Date via toString or
try to display any of the parts of the date using the normal, non-UTC
accessors, it will appear as the equivalent time local to the client.
You need your UI to create/display Date information as it is in UTC or
avoid sending Dates from remote services as Gordon suggests and just
send these fields indepdently.
 
 
 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Shannon Hicks
Sent: Monday, February 12, 2007 7:40 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Datefield inconsistencies? Or is it just me!



What happens is that the date field actually passes back a timestamp
with time zone specified, not just the date value. I ended up having to
turn datefield.selectedDate into a string with just the date
information, and pass that string to the server to be converted back
into a date.

It's an issue with AS3... date objects now have the full date, time and
timezone information, if you want it or not. You can't assign only part
of it.

Shan

Gordon Smith wrote: 



Perhaps you're having a time zone problem where it's the 9th on
the client and the 8th on the server.
 
A Date instance has a time as well as a date. I'd recommend
breaking the Date into month/day/year on the client and sending only
that information to the server.
 
- Gordon



From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of baserath_2001
Sent: Friday, February 09, 2007 1:18 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Datefield inconsistencies? Or is it just
me!



This little error is driving me crazy:

I am trying to populate a datagrid with values from a table
based on 
the day selected in the datefield. I can use the datefield to
choose 
and pass the value to my webservice but the result returned does
not 
reflect the date selected. For example I can select 2/9/2007 and
the 
service sends 2/8/2007 if it sends any data at all.

Is my error in flex or in my webservice. I know this is not a 
coldfusion forum but I use a cffunction as my service. I feel it
may 
be flex related since occasionally I can get the same error in 
VB.net. 

When the component is created I set the default date of the
datefield 
using the following code in the DateField Creation Complete
event:

creationComplete=dtcLogDate.selectedDate = new Date(); 

The initialized the data loads properly based on the above
setting 
but when I start changing the date is where the problem exists.

I pass the variable as the input parameter in the service using:

mx:request
dateVar{dtcLogDate.selectedDate}/dateVar
/mx:request

My webservice is below as you can see I receive the dateVar as a

cfarugment I then break it down into dayparts in order to filter
my 
data since the data, which being filtered is stored in
mm/dd/ 
hh:mm:ss AM format in the db.

cffunction 
name=getLogHistory 
displayname=getLogHistory 
hint=I get the log history for display 
access=remote 
output=false 
returntype=query

cfargument name=dateVar required=false /

cfset scheduleMonth = #DateFormat(arguments.dateVar, mm)#
cfset scheduleDay = #DateFormat(arguments.dateVar, dd)#
cfset scheduleYear = #DateFormat(arguments.dateVar, )#


cfquery name=gryLogHistory datasource=test
SELECT
E.first_name,
E.last_name,
E.address,
E.city,
E.state,
E.zip,
E.email,
E.phone as empPhone,
STUFF(CONVERT(char(19), L.logrecord , 100),1,12,'') AS 
LogInTime,
L.eid,
S.store_code,
S.address as StoreAddress,
S.city as StoreCity,
S.state as StoreState,
S.phone as StorePhone
FROM dbo.loghistory AS L
INNER JOIN dbo.employees AS E
ON L.eid = E.eid
INNER JOIN dbo.stores AS S
ON S.sid = E.sid
WHERE DATEPART(, L.logrecord) = #scheduleYear# AND 
DATEPART(mm, L.logrecord

RE: [flexcoders] Datefield inconsistencies? Or is it just me!

2007-02-12 Thread Gordon Smith
Perhaps you're having a time zone problem where it's the 9th on the
client and the 8th on the server.
 
A Date instance has a time as well as a date. I'd recommend breaking the
Date into month/day/year on the client and sending only that information
to the server.
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of baserath_2001
Sent: Friday, February 09, 2007 1:18 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Datefield inconsistencies? Or is it just me!



This little error is driving me crazy:

I am trying to populate a datagrid with values from a table based on 
the day selected in the datefield. I can use the datefield to choose 
and pass the value to my webservice but the result returned does not 
reflect the date selected. For example I can select 2/9/2007 and the 
service sends 2/8/2007 if it sends any data at all.

Is my error in flex or in my webservice. I know this is not a 
coldfusion forum but I use a cffunction as my service. I feel it may 
be flex related since occasionally I can get the same error in 
VB.net. 

When the component is created I set the default date of the datefield 
using the following code in the DateField Creation Complete event:

creationComplete=dtcLogDate.selectedDate = new Date(); 

The initialized the data loads properly based on the above setting 
but when I start changing the date is where the problem exists.

I pass the variable as the input parameter in the service using:

mx:request
dateVar{dtcLogDate.selectedDate}/dateVar
/mx:request

My webservice is below as you can see I receive the dateVar as a 
cfarugment I then break it down into dayparts in order to filter my 
data since the data, which being filtered is stored in mm/dd/ 
hh:mm:ss AM format in the db.

cffunction 
name=getLogHistory 
displayname=getLogHistory 
hint=I get the log history for display 
access=remote 
output=false 
returntype=query

cfargument name=dateVar required=false /

cfset scheduleMonth = #DateFormat(arguments.dateVar, mm)#
cfset scheduleDay = #DateFormat(arguments.dateVar, dd)#
cfset scheduleYear = #DateFormat(arguments.dateVar, )#


cfquery name=gryLogHistory datasource=test
SELECT
E.first_name,
E.last_name,
E.address,
E.city,
E.state,
E.zip,
E.email,
E.phone as empPhone,
STUFF(CONVERT(char(19), L.logrecord , 100),1,12,'') AS 
LogInTime,
L.eid,
S.store_code,
S.address as StoreAddress,
S.city as StoreCity,
S.state as StoreState,
S.phone as StorePhone
FROM dbo.loghistory AS L
INNER JOIN dbo.employees AS E
ON L.eid = E.eid
INNER JOIN dbo.stores AS S
ON S.sid = E.sid
WHERE DATEPART(, L.logrecord) = #scheduleYear# AND 
DATEPART(mm, L.logrecord) = #scheduleMonth# AND
DATEPART(dd, L.logrecord) = #scheduleDay# 
order by logrecord desc
/cfquery
cfreturn gryLogHistory /
/cffunction

Thanks in advance!
Shawn



 


Re: [flexcoders] Datefield inconsistencies? Or is it just me!

2007-02-12 Thread Shannon Hicks
What happens is that the date field actually passes back a timestamp 
with time zone specified, not just the date value. I ended up having to 
turn datefield.selectedDate into a string with just the date 
information, and pass that string to the server to be converted back 
into a date.


It's an issue with AS3... date objects now have the full date, time and 
timezone information, if you want it or not. You can't assign only part 
of it.


Shan

Gordon Smith wrote:


Perhaps you're having a time zone problem where it's the 9th on the 
client and the 8th on the server.
 
A Date instance has a time as well as a date. I'd recommend breaking 
the Date into month/day/year on the client and sending only that 
information to the server.
 
- Gordon



*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
*On Behalf Of *baserath_2001

*Sent:* Friday, February 09, 2007 1:18 PM
*To:* flexcoders@yahoogroups.com
*Subject:* [flexcoders] Datefield inconsistencies? Or is it just me!

This little error is driving me crazy:

I am trying to populate a datagrid with values from a table based on
the day selected in the datefield. I can use the datefield to choose
and pass the value to my webservice but the result returned does not
reflect the date selected. For example I can select 2/9/2007 and the
service sends 2/8/2007 if it sends any data at all.

Is my error in flex or in my webservice. I know this is not a
coldfusion forum but I use a cffunction as my service. I feel it may
be flex related since occasionally I can get the same error in
VB.net.

When the component is created I set the default date of the datefield
using the following code in the DateField Creation Complete event:

creationComplete=dtcLogDate.selectedDate = new Date();

The initialized the data loads properly based on the above setting
but when I start changing the date is where the problem exists.

I pass the variable as the input parameter in the service using:

mx:request
dateVar{dtcLogDate.selectedDate}/dateVar
/mx:request

My webservice is below as you can see I receive the dateVar as a
cfarugment I then break it down into dayparts in order to filter my
data since the data, which being filtered is stored in mm/dd/
hh:mm:ss AM format in the db.

cffunction
name=getLogHistory
displayname=getLogHistory
hint=I get the log history for display
access=remote
output=false
returntype=query

cfargument name=dateVar required=false /

cfset scheduleMonth = #DateFormat(arguments.dateVar, mm)#
cfset scheduleDay = #DateFormat(arguments.dateVar, dd)#
cfset scheduleYear = #DateFormat(arguments.dateVar, )#


cfquery name=gryLogHistory datasource=test
SELECT
E.first_name,
E.last_name,
E.address,
E.city,
E.state,
E.zip,
E.email,
E.phone as empPhone,
STUFF(CONVERT(char(19), L.logrecord , 100),1,12,'') AS
LogInTime,
L.eid,
S.store_code,
S.address as StoreAddress,
S.city as StoreCity,
S.state as StoreState,
S.phone as StorePhone
FROM dbo.loghistory AS L
INNER JOIN dbo.employees AS E
ON L.eid = E.eid
INNER JOIN dbo.stores AS S
ON S.sid = E.sid
WHERE DATEPART(, L.logrecord) = #scheduleYear# AND
DATEPART(mm, L.logrecord) = #scheduleMonth# AND
DATEPART(dd, L.logrecord) = #scheduleDay#
order by logrecord desc
/cfquery
cfreturn gryLogHistory /
/cffunction

Thanks in advance!
Shawn

 




RE: [flexcoders] Datefield inconsistencies? Or is it just me!

2007-02-12 Thread Gordon Smith
 It's an issue with AS3... date objects now have the full date, time
and timezone
 information, if you want it or not. You can't assign only part of it.

As far as I'm aware, when you construct a new Date in either AS2 or AS3
you an instance whose fields are set to the current date and time, as I
believe is required by the EcmaScript standard.You can always set the
time parts to something else, such as 0.
 
- Gordon
 


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Shannon Hicks
Sent: Monday, February 12, 2007 4:40 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Datefield inconsistencies? Or is it just me!



What happens is that the date field actually passes back a timestamp
with time zone specified, not just the date value. I ended up having to
turn datefield.selectedDate into a string with just the date
information, and pass that string to the server to be converted back
into a date.

It's an issue with AS3... date objects now have the full date, time and
timezone information, if you want it or not. You can't assign only part
of it.

Shan

Gordon Smith wrote: 



Perhaps you're having a time zone problem where it's the 9th on
the client and the 8th on the server.
 
A Date instance has a time as well as a date. I'd recommend
breaking the Date into month/day/year on the client and sending only
that information to the server.
 
- Gordon



From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of baserath_2001
Sent: Friday, February 09, 2007 1:18 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Datefield inconsistencies? Or is it just
me!



This little error is driving me crazy:

I am trying to populate a datagrid with values from a table
based on 
the day selected in the datefield. I can use the datefield to
choose 
and pass the value to my webservice but the result returned does
not 
reflect the date selected. For example I can select 2/9/2007 and
the 
service sends 2/8/2007 if it sends any data at all.

Is my error in flex or in my webservice. I know this is not a 
coldfusion forum but I use a cffunction as my service. I feel it
may 
be flex related since occasionally I can get the same error in 
VB.net. 

When the component is created I set the default date of the
datefield 
using the following code in the DateField Creation Complete
event:

creationComplete=dtcLogDate.selectedDate = new Date(); 

The initialized the data loads properly based on the above
setting 
but when I start changing the date is where the problem exists.

I pass the variable as the input parameter in the service using:

mx:request
dateVar{dtcLogDate.selectedDate}/dateVar
/mx:request

My webservice is below as you can see I receive the dateVar as a

cfarugment I then break it down into dayparts in order to filter
my 
data since the data, which being filtered is stored in
mm/dd/ 
hh:mm:ss AM format in the db.

cffunction 
name=getLogHistory 
displayname=getLogHistory 
hint=I get the log history for display 
access=remote 
output=false 
returntype=query

cfargument name=dateVar required=false /

cfset scheduleMonth = #DateFormat(arguments.dateVar, mm)#
cfset scheduleDay = #DateFormat(arguments.dateVar, dd)#
cfset scheduleYear = #DateFormat(arguments.dateVar, )#


cfquery name=gryLogHistory datasource=test
SELECT
E.first_name,
E.last_name,
E.address,
E.city,
E.state,
E.zip,
E.email,
E.phone as empPhone,
STUFF(CONVERT(char(19), L.logrecord , 100),1,12,'') AS 
LogInTime,
L.eid,
S.store_code,
S.address as StoreAddress,
S.city as StoreCity,
S.state as StoreState,
S.phone as StorePhone
FROM dbo.loghistory AS L
INNER JOIN dbo.employees AS E
ON L.eid = E.eid
INNER JOIN dbo.stores AS S
ON S.sid = E.sid
WHERE DATEPART(, L.logrecord) = #scheduleYear# AND 
DATEPART(mm, L.logrecord) = #scheduleMonth# AND
DATEPART(dd, L.logrecord) = #scheduleDay# 
order by logrecord desc
/cfquery
cfreturn gryLogHistory /
/cffunction

Thanks in advance!
Shawn




 


[flexcoders] Datefield inconsistencies? Or is it just me!

2007-02-09 Thread baserath_2001
This little error is driving me crazy:

I am trying to populate a datagrid with values from a table based on 
the day selected in the datefield. I can use the datefield to choose 
and pass the value to my webservice but the result returned does not 
reflect the date selected. For example I can select 2/9/2007 and the 
service sends 2/8/2007 if it sends any data at all.

Is my error in flex or in my webservice. I know this is not a 
coldfusion forum but I use a cffunction as my service. I feel it may 
be flex related since occasionally I can get the same error in 
VB.net.  


When the component is created I set the default date of the datefield 
using the following code in the DateField Creation Complete event:


creationComplete=dtcLogDate.selectedDate = new Date(); 


The initialized the data loads properly based on the above setting 
but when I start changing the date is where the problem exists.


I pass the variable as the input parameter in the service using:

mx:request
dateVar{dtcLogDate.selectedDate}/dateVar
/mx:request


My webservice is below as you can see I receive the dateVar as a 
cfarugment I then break it down into dayparts in order to filter my 
data since the data, which being filtered is stored in mm/dd/ 
hh:mm:ss AM format in the db.

cffunction 
name=getLogHistory 
displayname=getLogHistory 
hint=I get the log history for display 
access=remote 
output=false 
returntype=query

cfargument name=dateVar required=false /

cfset scheduleMonth = #DateFormat(arguments.dateVar, mm)#
cfset scheduleDay = #DateFormat(arguments.dateVar, dd)#
cfset scheduleYear = #DateFormat(arguments.dateVar, )#


cfquery name=gryLogHistory datasource=test
SELECT
  E.first_name,
  E.last_name,
  E.address,
  E.city,
  E.state,
  E.zip,
  E.email,
  E.phone as empPhone,
  STUFF(CONVERT(char(19), L.logrecord , 100),1,12,'') AS 
LogInTime,
  L.eid,
  S.store_code,
  S.address as StoreAddress,
  S.city as StoreCity,
  S.state as StoreState,
  S.phone as StorePhone
FROM dbo.loghistory AS L
INNER JOIN dbo.employees AS E
ON L.eid = E.eid
INNER JOIN dbo.stores AS S
ON S.sid = E.sid
WHERE DATEPART(, L.logrecord) = #scheduleYear# AND 
DATEPART(mm, L.logrecord) = #scheduleMonth# AND
DATEPART(dd, L.logrecord) = #scheduleDay# 
order by logrecord desc
/cfquery
cfreturn gryLogHistory /
/cffunction

Thanks in advance!
Shawn