Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Date format problem

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-30-2007, 11:00 AM
Senior Member
 
Join Date: Jun 2007
Location: Netherlands (Arnhem)
Posts: 107
Awards Showcase
Beta Tester 
Total Awards: 1
Default Date format problem

(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?
__________________
PPC: IPAQ 2210, 2GB, CF GPS, CF Wireless
Mobile: Samsung Omnia I900 (WM6.1)
Reply With Quote
  #2 (permalink)  
Old 06-30-2007, 04:26 PM
Basic4ppc Veteran
 
Join Date: Apr 2007
Posts: 269
Default

have you checked whether the preset dateformats are the sae in the ppc and the pc?
Reply With Quote
  #3 (permalink)  
Old 06-30-2007, 04:46 PM
Senior Member
 
Join Date: Jun 2007
Location: Netherlands (Arnhem)
Posts: 107
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Quote:
Originally Posted by Stellaferox View Post
have you checked whether the preset dateformats are the sae in the ppc and the pc?
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".

Scub
__________________
PPC: IPAQ 2210, 2GB, CF GPS, CF Wireless
Mobile: Samsung Omnia I900 (WM6.1)
Reply With Quote
  #4 (permalink)  
Old 06-30-2007, 06:42 PM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Ioannina, Greece
Posts: 356
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Quote:
..."Try Unix"
???!!! 8-)
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
  #5 (permalink)  
Old 06-30-2007, 07:05 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,344
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

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??
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)

My Posts helped you? Consider Buying me a Porto Glass!
Reply With Quote
  #6 (permalink)  
Old 06-30-2007, 07:45 PM
Senior Member
 
Join Date: Jun 2007
Location: Netherlands (Arnhem)
Posts: 107
Awards Showcase
Beta Tester 
Total Awards: 1
Default

A sample is here: http://www.scubaticus.nl/PPC/datetest.sbp

Is it only on my device? Remeber, on my PC it works the way it should, it's the PPC (Ipaq 2210) which is causing me trouble.

Scub
__________________
PPC: IPAQ 2210, 2GB, CF GPS, CF Wireless
Mobile: Samsung Omnia I900 (WM6.1)
Reply With Quote
  #7 (permalink)  
Old 07-01-2007, 10:14 AM
specci48's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Germany
Posts: 1,057
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Hi Scubaticus,

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



specci48
Reply With Quote
  #8 (permalink)  
Old 07-01-2007, 10:54 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,734
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Please check the format string using:
msgbox(frmDateufmt.Format,frmDatefmt.Format)
Reply With Quote
  #9 (permalink)  
Old 07-01-2007, 11:49 AM
Senior Member
 
Join Date: Jun 2007
Location: Netherlands (Arnhem)
Posts: 107
Awards Showcase
Beta Tester 
Total Awards: 1
Default

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 ...

Scub
__________________
PPC: IPAQ 2210, 2GB, CF GPS, CF Wireless
Mobile: Samsung Omnia I900 (WM6.1)

Last edited by Scubaticus : 07-01-2007 at 12:04 PM.
Reply With Quote
  #10 (permalink)  
Old 07-03-2007, 12:35 PM
Junior Member
 
Join Date: May 2007
Location: Germany
Posts: 45
Default

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)

regards
BerndB
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Date and Time Erel Tutorials 6 01-28-2010 11:01 PM
working with date gjoisa Questions (Windows Mobile) 3 03-29-2008 09:40 AM
How to get the value of date substraction ? gjoisa Questions (Windows Mobile) 1 02-11-2008 09:15 AM
How I have compare date? epatrik Questions (Windows Mobile) 4 09-20-2007 09:54 AM
filter for date manu Questions (Windows Mobile) 2 06-09-2007 01:13 PM


All times are GMT. The time now is 10:29 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0