Date format problem

Discussion in 'Questions (Windows Mobile)' started by Scubaticus, Jun 30, 2007.

  1. Scubaticus

    Scubaticus Active Member Licensed User

    :sign0144: (well, sort of)

    I have a small form with two date fields on it.
    On date field is formatted in the form with: dddd : mmm yyyy
    The other date field has a blank format in the form. The format of this field is set in the program with calendar1.Format = "dddd : mmm yyyy"

    On my PC, both dates show as "Saturday : Jun 2007"
    On my PPC, only the field with hardcoded format shows "Saturday : Jun 2007",
    the one set by the program as "6/30/2007 12:52"

    I can't find an explanation for this behaviour. It this a known problem?
  2. Stellaferox

    Stellaferox Active Member Licensed User

    have you checked whether the preset dateformats are the sae in the ppc and the pc?
  3. Scubaticus

    Scubaticus Active Member Licensed User

    As I mentioned in my post, when I hardcode the dateformat in the control format field, the date shows the way I want it. When I empty the hard coded format and try to set the SAME code with calendar1.format command, it's not displaying my format but some kind of default

    So whats the difference by hard coding & softcoding the date format?

    It's like textbox.text (hard coded "B4PPC is Great") gives you "B4PPC is Great"
    and textbox.text = "B4PPC is Great" will give you "Try Unix".

  4. dzt

    dzt Active Member Licensed User

    ???!!! :cool:
  5. Cableguy

    Cableguy Expert Licensed User

    I think this has to do with the way date format is set in your regional settings/ date settings in the device control panel...Since you are leaving the format blank it assumes the same format as the system date format??
  6. Scubaticus

    Scubaticus Active Member Licensed User

  7. specci48

    specci48 Well-Known Member Licensed User

    Hi Scubaticus,

    interesting but true.
    On my device (iPAQ rx1950, WM5, german language) your code runs perfectly
    showing two times the same date format.

  8. Erel

    Erel Administrator Staff Member Licensed User

    Please check the format string using:
  9. Scubaticus

    Scubaticus Active Member Licensed User

    Hi Erel,

    The message box gives me an OK button and a balloon with only a question mark in it.

    So it seems there is no attribute set for the format, or the attribute assigned is not valid (in that case I would expect an error message). But again a hard coded format shows it so doesn't that mean the device is capable of displaying?

    Or is it perhaps the compiler initiates the object different when a hard-coded format for a date object is present?

    Is there a way to find out which formats are supported on a device? I want my users to allow to set the date format the way they want (it's an multilingual app)

    Added: I also tested with frmDateUfmt.Format = "dd/mm/yyyy" doesn't work either. Looks like I cannot set my date other than hard coded ...

    Last edited: Jul 1, 2007
  10. BerndB

    BerndB Member Licensed User

    Hi Scubaticus,

    on my loox720 WM2003SE

    it shows two times Tuesday:Jul 2007

    (on the device Erels msgbox command gives a compiler error.)

    Did you try to leave a hardcoded format in calendar1, and then overwrite it in App_Start with your new format? - (Just an idea)

  11. Scubaticus

    Scubaticus Active Member Licensed User

    Yes I tried different things but it just doesn't work. On my PDA I'm running MS PocketPC V4.2 (build 14053) english version (!) on a PXA255 processor.

    My regional settings are Dutch.

    I don't think however it's the device because other apps are reacting just normal when I change the regional settings. I'm not sure if they use the underlaying .net technology like b4ppc.

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice