Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Relative Date Format (DateTimePicker Control)

Relative Date Format (DateTimePicker Control)

Scheduled Pinned Locked Moved C#
tutorialquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kaminem
    wrote on last edited by
    #1

    Hi all, I'm using a DateTimePicker Control to select a day (01/01/2008 for example) is there a way to customise the Date Format so that I can use Relative Date ? for example today is 03/01/2008 and I want to select 01/01/2008 so I just write -2d (relative date from today) thanks for any ideas

    S 1 Reply Last reply
    0
    • K kaminem

      Hi all, I'm using a DateTimePicker Control to select a day (01/01/2008 for example) is there a way to customise the Date Format so that I can use Relative Date ? for example today is 03/01/2008 and I want to select 01/01/2008 so I just write -2d (relative date from today) thanks for any ideas

      S Offline
      S Offline
      sujithkumarsl
      wrote on last edited by
      #2

      that you can simply achieve thru code right?

      My small attempt...

      K 1 Reply Last reply
      0
      • S sujithkumarsl

        that you can simply achieve thru code right?

        My small attempt...

        K Offline
        K Offline
        kaminem
        wrote on last edited by
        #3

        I can't enter (-2D) because the Date format is fixed ("MM dd yyyy" for example) is there a way to enable editing the Date value without checking the format or is there a way to create a relative format :doh: sure when I get -2D in the Value property I can achieve thru code thanks

        modified on Thursday, January 03, 2008 7:13:19 AM

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups