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 a simple and a complicated question


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-09-2008, 06:07 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,343
Awards Showcase
Forum Contributer 
Total Awards: 1
Default Calendar control a simple and a complicated question

Hi guys, Seems like I have lost my touch with the all codding process, so some newbie questions are poping...

First the simple question:
How do I re-set the calendarcontrol to show the today's date?
Now the Complicated one...
How do i "Extract" the date as a string, without the time bit...??
I need to save this string to a file in the same format as the calendars..

Thanks guys
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD

DLL Version Listing
Reply With Quote
  #2 (permalink)  
Old 02-09-2008, 06:11 PM
RandomCoder's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: UK
Posts: 486
Awards Showcase
Beta Tester 
Total Awards: 1
Default

To answer your second question, don't you just need to store the ticks value.
Then when you recall the value you simply format it to show the date.

Regards,
RandomCoder
__________________
Desktop: Pentium D 920 (2.8GHz, 4MB L2 Cache, 800MHz FSB), 1024MB, 256MB Radeon X600, 250GB HD.
Device : Axim X51v XScale 624MHz, 3.7" VGA, 64MB SDRAM, 256MB Flash ROM + 1Gb SD.

"Defeat never comes to any man until he admits it."Josephus Daniels
Reply With Quote
  #3 (permalink)  
Old 02-09-2008, 06:22 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,199
Default

Code:
Sub App_Start
    Form1.Show
    Msgbox(GetDate)
End Sub

Sub SetToday
    Calendar1.Value = Now
End Sub

Sub GetDate
    Return Date(Calendar1.Value)
End Sub
Reply With Quote
  #4 (permalink)  
Old 02-09-2008, 06:45 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,343
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

@RandomCoder:
Thanks for your suggestion, but since theese values are going to be written out to a file, I may need to use them as a commom ground for other apps to use, so for me it is best to save them as strings.

@EREL
As fast and acurate as EVER...

Thanks again...
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD

DLL Version Listing
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
Close method for calendar control specci48 Basic4ppc Wishlist 0 11-04-2007 09:44 AM
Simple Question Scubaticus Questions & Help Needed 4 07-24-2007 06:15 AM
Calendar control BjornF Questions & Help Needed 7 07-05-2007 08:52 AM


All times are GMT. The time now is 02:26 AM.


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