setting current date..

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vikas1111
    New Member
    • Feb 2008
    • 122

    setting current date..

    Hi All
    In the form which i am coding there is an option of date ,, for that i am using TDBdate control ,, My problem is i need to set that date to the current date i.e . everyday the date should be updated to the current date..Hope i am clear... How can i do that ?????????????/
  • Ali Rizwan
    Banned
    Contributor
    • Aug 2007
    • 931

    #2
    write this code in form load event
    add a label in form

    Code:
    label1.caption=Date
    Regards
    >> ALI <<

    Comment

    • vikas1111
      New Member
      • Feb 2008
      • 122

      #3
      Originally posted by Ali Rizwan
      write this code in form load event
      add a label in form

      Code:
      label1.caption=Date
      Regards
      >> ALI <<

      No i want to set current date in that box...

      Comment

      • debasisdas
        Recognized Expert Expert
        • Dec 2006
        • 8119

        #4
        If you want to give an option to choose a valid date to the user and se t the default date to system date then use DTPicker and set the value =now or date

        Comment

        • vikas1111
          New Member
          • Feb 2008
          • 122

          #5
          Originally posted by debasisdas
          If you want to give an option to choose a valid date to the user and se t the default date to system date then use DTPicker and set the value =now or date

          Hey thanks for reply..
          i checked out components box , i only have tdb date..where can i find dtpicker and how can i add it to my tool box

          Comment

          • QVeen72
            Recognized Expert Top Contributor
            • Oct 2006
            • 1445

            #6
            Hi,

            For Date Picker:

            Projects >> Add Components >> Microsoft Windows Common Controls-2 6.0

            Regards
            Veena

            Comment

            • vikas1111
              New Member
              • Feb 2008
              • 122

              #7
              Hey thanks for both it worked.........

              Comment

              Working...