Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Format Date (compact framework)
Message
From
26/05/2004 09:47:19
 
General information
Forum:
ASP.NET
Category:
WebForms
Miscellaneous
Thread ID:
00905535
Message ID:
00907328
Views:
11
John,

You say your XML has no schema, but are you reading it into an existing DataSet that *does* have a schema? I'm thinking that date might be being stored in your DataSet as a string rather than as a date which might explain why it isn't sorting correctly.

~~Bonnie


>Hi Fred
>
>I have checked the settings on the Pocket PC and all seem to be correct. Did you set anything using the System.Globalization class?
>
>I am reading the data from an XML file created with VFP8 SP1 CURSORTOXML() function with no schema. Once displayed in a datagrid it's formatted as 2004-05-26.
>
>I have tried creating a string using SUBSTRING() which then displays correctly, but the column won't sort in date order.
>
>
>John
>
>>Make sure in the regional settings you set the date format to dd/MM/yy. make sure to use MM for month an not mm
>>
>>>Hi Fred
>>>
>>>I have tried setting the PPC to English(UK) but it's doesn’t seem to make any difference to how the datagrid displays the date. I had already tried creating the date as a string in VFP using SUBSTRING(Dob,1,2) + "/" + ...
>>>and although it displays correctly it didn’t seem to sort the column correctly. I was only using two digits for the year maybe that affected the sort order?
>>>
>>>John
>>>
>>>
>>>>Make sure your regional setting on your PPC or Emulator is set to English(UK). That would fix the display. I'm in Australia and we did the same thing.
>>>>the other thinng you could concatenate your query string - SQL - using day(date)+'/'+month(date)+'/'+year(date) as Mydate
>>>>
>>>>>I am saving data to an xml file using CURSORTOXML() in VFP8. The date columns are formatted yyyy-mm-dd. When I read them into a dataset and display them in a data grid how do I format the column to display them as dd-mm-yyyy or dd/mm/yyyy?
>>>>>
>>>>>I am using the compact framework and C#.
>>>>>
>>>>>Thanks for any help
>>>>>
>>>>>John.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Reply
Map
View

Click here to load this message in the networking platform