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. Database & SysAdmin
  3. Database
  4. DateTime _Oct2007

DateTime _Oct2007

Scheduled Pinned Locked Moved Database
database
12 Posts 4 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.
  • S soni uma

    Try This, select convert(varchar(50),getdate(),106) :)

    R Offline
    R Offline
    r a j u u
    wrote on last edited by
    #3

    hi soni Uma....Thanks for reply..... I want to display only the month and year..(Oct-2007) if u know that plz reply me.. see the following code...thats i have used...but its displaying 10-2007.... select Cast(DatePart(month,RenewalBaseMonth) as varchar) + '/' +Cast(DatePart(year,RenewalBaseMonth) as varchar) as RenewalBaseMonth from #temp21 Thanks

    Rajendran

    S S 2 Replies Last reply
    0
    • R r a j u u

      hi soni Uma....Thanks for reply..... I want to display only the month and year..(Oct-2007) if u know that plz reply me.. see the following code...thats i have used...but its displaying 10-2007.... select Cast(DatePart(month,RenewalBaseMonth) as varchar) + '/' +Cast(DatePart(year,RenewalBaseMonth) as varchar) as RenewalBaseMonth from #temp21 Thanks

      Rajendran

      S Offline
      S Offline
      Senu Gandhi
      wrote on last edited by
      #4

      Hi, Try this select Cast(DateName(month,RenewalBaseMonth) as varchar(3)) + '/' +Cast(DatePart(year,RenewalBaseMonth) as varchar) as RenewalBaseMonth from #temp21 Senthil -- modified at 8:15 Tuesday 30th October, 2007

      R 1 Reply Last reply
      0
      • R r a j u u

        hi soni Uma....Thanks for reply..... I want to display only the month and year..(Oct-2007) if u know that plz reply me.. see the following code...thats i have used...but its displaying 10-2007.... select Cast(DatePart(month,RenewalBaseMonth) as varchar) + '/' +Cast(DatePart(year,RenewalBaseMonth) as varchar) as RenewalBaseMonth from #temp21 Thanks

        Rajendran

        S Offline
        S Offline
        soni uma
        wrote on last edited by
        #5

        Ok This is work fine select DATENAME(MONTH,GETDATE()) + '/' + Cast(DatePart(year,getdate()) as varchar):) Have nice time

        R 1 Reply Last reply
        0
        • S Senu Gandhi

          Hi, Try this select Cast(DateName(month,RenewalBaseMonth) as varchar(3)) + '/' +Cast(DatePart(year,RenewalBaseMonth) as varchar) as RenewalBaseMonth from #temp21 Senthil -- modified at 8:15 Tuesday 30th October, 2007

          R Offline
          R Offline
          r a j u u
          wrote on last edited by
          #6

          hi, Its working fine.... Really good work and thanks alot....

          Rajendran

          S 1 Reply Last reply
          0
          • R r a j u u

            hi, Its working fine.... Really good work and thanks alot....

            Rajendran

            S Offline
            S Offline
            Senu Gandhi
            wrote on last edited by
            #7

            Pls rate my answer if it is working well Senthil

            R A 2 Replies Last reply
            0
            • S soni uma

              Ok This is work fine select DATENAME(MONTH,GETDATE()) + '/' + Cast(DatePart(year,getdate()) as varchar):) Have nice time

              R Offline
              R Offline
              r a j u u
              wrote on last edited by
              #8

              Thanks for reply...already senu gandhi sent me that solution...I solved that problem ... Thanks..

              Rajendran

              1 Reply Last reply
              0
              • S Senu Gandhi

                Pls rate my answer if it is working well Senthil

                R Offline
                R Offline
                r a j u u
                wrote on last edited by
                #9

                May I know where u r working..If u feel good tell me. Thanks..

                Rajendran

                S 1 Reply Last reply
                0
                • S Senu Gandhi

                  Pls rate my answer if it is working well Senthil

                  A Offline
                  A Offline
                  Andy M
                  wrote on last edited by
                  #10

                  Senu Gandhi wrote:

                  Pls rate my answer if it is working well

                  It is rude to solicit votes.

                  S 1 Reply Last reply
                  0
                  • R r a j u u

                    May I know where u r working..If u feel good tell me. Thanks..

                    Rajendran

                    S Offline
                    S Offline
                    Senu Gandhi
                    wrote on last edited by
                    #11

                    Hi Rajendran, I am working in Pricol Ltd, Coimbatore as Dev lead. How about u? Senthil

                    1 Reply Last reply
                    0
                    • A Andy M

                      Senu Gandhi wrote:

                      Pls rate my answer if it is working well

                      It is rude to solicit votes.

                      S Offline
                      S Offline
                      Senu Gandhi
                      wrote on last edited by
                      #12

                      I am sorry Andy. Senthil

                      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