This content has been marked as final. Show 3 replies
"justneed2know" <email@example.com> wrote in message
>I currently use Flex web services to request data from an sql server
> (via a .net app) and bind the result set .net datatable to a flex
> The datagrid has a datetime column that displays the local time at which
> client created the record instead of the sql server datetime value. How
> can I
> change my datagrid records to show the database's datetime? Here's an
> related to this issue... but wasn't able to get it to work in my context:
> Any help would be appreciated!
Why not just send the request to create the record to the server _before_
you do anything with it in Flex, then bring it back and display it in Flex?
Not sure if I understand your suggestion. When the user first creates the record, it is "timestamped" in sql server with the correct datetime (reflects sql server's data center timezone). Now, when the Flex app fetches the record (.net datatable binded to the Flex data grid), the datetime shows the local time at which the user created the record and not the true datetime stamp of the record in the database. Flex allows for easy binding of .net datatables to datagrid, which I've taken advantage of.
Please suggest any work arounds...
Why don't you just return two datetimes back, one is the original timestamp of what the server made when it inserted the record, and the second was a preformatted date (could look the exact same as the timestamp) which was scoped as a string and not a date. This is the one you would show inside of your datagrid, scoping it as a string would ensure that none of Flex's date serialization is going to mess with it. And if you still need to manipulate it you still have your other reference which is scoped as the datetime.