Calendar control a simple and a complicated question

Discussion in 'Questions (Windows Mobile)' started by Cableguy, Feb 9, 2008.

  1. Cableguy

    Cableguy Expert Licensed User

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

    RandomCoder Well-Known Member Licensed User

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

    Erel Administrator Staff Member Licensed User

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

    Cableguy Expert Licensed User

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