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. Web Development
  3. SharePoint
  4. Custom Content Type Question

Custom Content Type Question

Scheduled Pinned Locked Moved SharePoint
questionvisual-studio
5 Posts 3 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.
  • A Offline
    A Offline
    Aptiva Dave
    wrote on last edited by
    #1

    I'm building a custom content type in vs and I have a field that is a date. I am using field type of "DateTime", but how can I have only the date and not the time?

    I A 2 Replies Last reply
    0
    • A Aptiva Dave

      I'm building a custom content type in vs and I have a field that is a date. I am using field type of "DateTime", but how can I have only the date and not the time?

      I Offline
      I Offline
      Ingo
      wrote on last edited by
      #2

      Set the FieldType to DateTime and the Format to "DateOnly":

      Hope I could help you.

      ------------------------------ Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.

      A 1 Reply Last reply
      0
      • I Ingo

        Set the FieldType to DateTime and the Format to "DateOnly":

        Hope I could help you.

        ------------------------------ Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.

        A Offline
        A Offline
        Aptiva Dave
        wrote on last edited by
        #3

        Thanks. I finally found on msdn the page that tells you what each attribute is in the tag and completely forgot to update this post.

        1 Reply Last reply
        0
        • A Aptiva Dave

          I'm building a custom content type in vs and I have a field that is a date. I am using field type of "DateTime", but how can I have only the date and not the time?

          A Offline
          A Offline
          Anandavel p
          wrote on last edited by
          #4

          i thing you are using visualwebpart in coding just give this.DateTimeControl1.SelectedDate.ToShortDateString() (don't give this.DateTimeControl1.SelectedDate.ToString() it show's time also)

          A 1 Reply Last reply
          0
          • A Anandavel p

            i thing you are using visualwebpart in coding just give this.DateTimeControl1.SelectedDate.ToShortDateString() (don't give this.DateTimeControl1.SelectedDate.ToString() it show's time also)

            A Offline
            A Offline
            Aptiva Dave
            wrote on last edited by
            #5

            No, I'm sending a string to a HTML control because I just want to display text on the screen.

            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