Thaks for you reply, i have given up for now on using dates and
started  using strings for work with flex.  

- Kelly

--- In [email protected], "Tim Hoff" <[EMAIL PROTECTED]> wrote:
>
> My appologies Kelly.  When I pulled up the ASP.NET code, I realized 
> that I am sending the dates as strings.  As far as the code is 
> concerned; using ASP.Net, the SQL Server fields are returned to a 
> dataset by a stored procedure.  The dataset fields are then cast to 
> a class:
> 
> Dim i As Integer
> i = 0
> Dim contacts As contactVO() = New contactVO(ds.Tables(0).Rows.Count -
>  1) {}
> 
> Dim aRow As DataRow
> For Each aRow In ds.Tables(0).Rows
>  
>   contacts(i).BirthDate = CStr(aRow("BirthDate"))
>   i += 1
> 
> Next
> 
> Return contacts
> 
> Sorry for the confusion,
> Tim
> 
> --- In [email protected], "kellyb723" <junk0106@> wrote:
> >
> > Very strange that is exactly what i'm doing.  My Web Service code
> > looks like this, is yours similer?
> > 
> > [WebMethod]
> > public Contact GetContactByID(string contactId)
> > {
> >   Contact c = new Contact()
> >   // do database lookup here
> >   c.BirthDate = (DateTime)mySqlDataReader["BirthDate"];
> > 
> >   return c;
> > }
> > 
> > public class Contact
> > {
> >   public DateTime BirthDate
> >   {
> >     get { return _birthDate; } 
> >     set {_birthDate = value; } 
> >   }
> >   private DateTime _birthDate;
> > }
> > 
> > - Kelly
> > 
> > --- In [email protected], "Tim Hoff" <TimHoff@> wrote:
> > >
> > > Kelly,
> > > 
> > > I'm returning a SQL Server DateTime field that is cast to a .NET 
> > > DateTime field in a class.  Maybe because it's coming from SQL 
> > > Server, it has the time zone suffix.
> > > 
> > > -TH
> > > 
> > > --- In [email protected], "kellyb723" <junk0106@> wrote:
> > > >
> > > > Tim,  Are you returning strongly types classes from you web 
> > > services
> > > > that include DateTime properties?  Or are you returning object 
> or a
> > > > DataSet or XmlDocument?  
> > > >  
> > > > I've found that if I return 'object' from my web services 
> there is 
> > > no
> > > > WSDL generated for the return type and flex leaves everything 
> as a
> > > > string.  But I really want to use there web services for more 
> that
> > > > just a Flex UI, and would much prefer to return strongly typed 
> > > results
> > > > with full WSDL.
> > > >  
> > > > Also regardless or the output type of the webservice, if I 
> send a 
> > > Flex
> > > > Date object to a webservice it comes in as a string that has 
> been
> > > > converted to UTC time, and has to manually converted back.
> > > >  
> > > > - Kelly
> > > > 
> > > > --- In [email protected], "Tim Hoff" <TimHoff@> wrote:
> > > > >
> > > > > Not sure what to tell you.  I'm returning DateTime values 
> from 
> > > > > a .NET web service and not experiencing the same problem.  
> > > Perhaps, 
> > > > > just cast the returned value to a string VO on the Flex side.
> > > > > 
> > > > > Good luck,
> > > > > -TH
> > > > > 
> > > > > --- In [email protected], "kellyb723" <junk0106@> 
> wrote:
> > > > > >
> > > > > > That will make it come over as a string but I'm actually 
> > > returning
> > > > > > classes from my .NET we srvices that are automatically 
> > > > > serialized.  I
> > > > > > dont want to have to deal with strings for dates on 
> the .NET 
> > > side
> > > > > > where DateTimes actually work properly.
> > > > > > 
> > > > > > I've also posted a similer thread in the Adobe flex 
> forums, 
> > > but 
> > > > > have
> > > > > > to received any replies.  Am I to userstand that Flex just 
> > > insn't
> > > > > > intended to work with Web Services when using actual 
> dates?  
> > > Or 
> > > > > with
> > > > > > .NET Web Services in gerneral?
> > > > > > 
> > > > > > - Kelly
> > > > > > 
> > > > > > --- In [email protected], "Tim Hoff" <TimHoff@> 
> wrote:
> > > > > > >
> > > > > > > If you pass the dateTime values back and forth as 
> strings, 
> > > you 
> > > > > won't 
> > > > > > > experience any local time conversion.  However, you 
> might 
> > > have 
> > > > > to 
> > > > > > > massage the data a little if you do it this way.
> > > > > > > 
> > > > > > > -TH
> > > > > > > 
> > > > > > > --- In [email protected], "kellyb723" 
> <junk0106@> 
> > > wrote:
> > > > > > > >
> > > > > > > > I read an old thread on this but there did not seem to 
> be 
> > > any
> > > > > > > > resolution.  
> > > > > > > > 
> > > > > > > > Has someone found a way to turn off the automatic 
> > > inaccurate
> > > > > > > > conversion to local time that Flex 2.0 does to dates 
> it 
> > > > > receives 
> > > > > > > from
> > > > > > > > .NET Web Services?
> > > > > > > > 
> > > > > > > > The date line in my WSDL is as follows:
> > > > > > > > <s:element minOccurs="1" maxOccurs="1" name="BirthDate"
> > > > > > > > nillable="true" type="s:dateTime"/>
> > > > > > > > 
> > > > > > > > If the web service sends "1977-06-12T00:00:00" in the 
> > > response 
> > > > > Flex
> > > > > > > > receives it and creates a Date property to the object 
> but 
> > > > > converts 
> > > > > > > it
> > > > > > > > for the machines local timezone.  Worse yet, even if i 
> > > manually
> > > > > > > > compensate for this in AS3 code it get coverted the 
> other 
> > > way 
> > > > > when
> > > > > > > > going back in the to the server for the Save service.
> > > > > > > > 
> > > > > > > > This problem has me pulling my hair out.  My app does 
> all 
> > > > > timezone
> > > > > > > > management interally, adn mostly just doesn't care. I 
> just 
> > > > > want 
> > > > > > > this
> > > > > > > > turned off.
> > > > > > > > 
> > > > > > > > Can anyone Help?
> > > > > > > > 
> > > > > > > > - Kelly
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>







------------------------ Yahoo! Groups Sponsor --------------------~--> 
Great things are happening at Yahoo! Groups.  See the new email design.
http://us.click.yahoo.com/TISQkA/hOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to