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.

  3. Erel

    Erel Administrator Staff Member Licensed User

    Sub App_Start
    End Sub

    Sub SetToday
        Calendar1.Value = Now
    End Sub

    Sub GetDate
    Return Date(Calendar1.Value)
    End Sub
  4. Cableguy

    Cableguy Expert Licensed User

    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.

    As fast and acurate as EVER...

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