Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Calendar control


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-04-2007, 01:55 PM
Senior Member
 
Join Date: Apr 2007
Location: Copenhagen
Posts: 141
Default Calendar control

Is there a way to change the format the calendar control uses on the form? (currently it is mm/dd/yyyy)

DateFormat("dd/mm/yyyy") only changes the format given in the "Today:..." part when you open the control. When you select a date the result shown in the control is once again in the mm/dd/yyyy format.

Grateful for suggestions / Björn
Reply With Quote
  #2 (permalink)  
Old 07-04-2007, 03:09 PM
alfcen's Avatar
Basic4ppc Veteran
 
Join Date: Apr 2007
Location: Okinawa, Ryukyu
Posts: 424
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Hello Björn
I tried with
Calendar1.Format="dd/mm/yyyy"
Works on the desktop, but not on my device (iPAQ hx4700).
Reply With Quote
  #3 (permalink)  
Old 07-04-2007, 03:14 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,132
Default

Can you post an example that doesn't work?
I've checked it and it seemed to work properly.
Reply With Quote
  #4 (permalink)  
Old 07-04-2007, 03:24 PM
Senior Member
 
Join Date: Apr 2007
Location: Copenhagen
Posts: 141
Post

Here is the code:

Sub App_Start
DateFormat("dd/mm/yyyy") 'this one doesn't make a difference
Form1.Show
End Sub

Sub Button1_Click
FirstTime=Date1.Value+TimeParse(Hour1.Text&":"&Min 1.Text)
SecondTime=Date2.Value+TimeParse(Hour2.Text&":"&Mi n2.Text)
ResultTime=SecondTime-FirstTime
End sub

(dd/mm/yyyy is the default on my Pc)

all the best / Björn

Last edited by BjornF : 07-04-2007 at 03:33 PM.
Reply With Quote
  #5 (permalink)  
Old 07-04-2007, 03:36 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,132
Default

DateFormat doesn't change the Calendar control format.
You should use Date1.Format = "dd/mm/yyyy"
Reply With Quote
  #6 (permalink)  
Old 07-04-2007, 03:52 PM
Senior Member
 
Join Date: Apr 2007
Location: Copenhagen
Posts: 141
Default

Thank you Alfcen and Erel, that solves the problem.

Perhaps it could be added to the description of the Format keyword in the helpfile (for us with small imagination) ?

all the best / Björn
Reply With Quote
  #7 (permalink)  
Old 07-04-2007, 03:59 PM
alfcen's Avatar
Basic4ppc Veteran
 
Join Date: Apr 2007
Location: Okinawa, Ryukyu
Posts: 424
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Erel,
This seems to work only on the PC. Well, that could be device dependent.
Reply With Quote
  #8 (permalink)  
Old 07-05-2007, 08:52 AM
Senior Member
 
Join Date: Apr 2007
Location: Copenhagen
Posts: 141
Default

Dear Alfcen,

it does seem to be device dependent, at least it works on my Loox 720 (WM2003 SE).

all the best / Björn
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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calendar Control: I can't see the year. sloopa Questions & Help Needed 4 06-25-2008 07:30 PM
Calendar Control alfcen Questions & Help Needed 9 02-12-2008 03:28 AM
Calendar control a simple and a complicated question Cableguy Questions & Help Needed 3 02-09-2008 06:45 PM
Creating a Calendar control dynamically? willisgt Questions & Help Needed 5 01-06-2008 10:48 AM
Close method for calendar control specci48 Basic4ppc Wishlist 0 11-04-2007 09:44 AM


All times are GMT. The time now is 12:42 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0