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. displaying date only

displaying date only

Scheduled Pinned Locked Moved SharePoint
question
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 have a list that has a datetime field that is set with a format='DateOnly'. When I retrieve the list items using caml that field shows a time of 12:00:00 am. How can I get rid of the time?

    S I 2 Replies Last reply
    0
    • A Aptiva Dave

      I have a list that has a datetime field that is set with a format='DateOnly'. When I retrieve the list items using caml that field shows a time of 12:00:00 am. How can I get rid of the time?

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

      when you say using CAML, is this code behind? VB/C#? Is it javascript or what? For your display, you have many options including functions if you use XSLT, Javascript, etc...

      A 1 Reply Last reply
      0
      • S SPMatt

        when you say using CAML, is this code behind? VB/C#? Is it javascript or what? For your display, you have many options including functions if you use XSLT, Javascript, etc...

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

        From MSDN:

        Collaborative Application Markup Language (CAML) is an XML-based language that is used in Microsoft SharePoint Foundation to define the fields and views that are used in sites and lists.

        Don't mean so sound like a troll, but I didn't know how to answer it any other way. Anyway, I ended up just throwing my result for the date column into a date object and then using that object's toshortdatestring method to display it correctly.

        1 Reply Last reply
        0
        • A Aptiva Dave

          I have a list that has a datetime field that is set with a format='DateOnly'. When I retrieve the list items using caml that field shows a time of 12:00:00 am. How can I get rid of the time?

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

          Did you try:

          Type="DateTime" IncludeTimeValue="FALSE"

          ------------------------------ 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

            Did you try:

            Type="DateTime" IncludeTimeValue="FALSE"

            ------------------------------ 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
            #5

            Yeah.

            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