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. ASP.NET
  4. Get Date from Web Server or DB Server?

Get Date from Web Server or DB Server?

Scheduled Pinned Locked Moved ASP.NET
databasesql-servercomsysadmintutorial
3 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.
  • W Offline
    W Offline
    Waleed Eissa
    wrote on last edited by
    #1

    Hi gurus, I wonder whether it's better to pass the current date to my DAL from my BLL or do this in my sproc (using GetDate() in SQL Server for example), or in others words is it better to get the date from the web server or the db server? What are the pros and cons of every approach? (in case you're wondering it's a website with a forums section and I want this for the thread adding code) Regards

    Waleed Eissa Software Developer Sydney

    C 1 Reply Last reply
    0
    • W Waleed Eissa

      Hi gurus, I wonder whether it's better to pass the current date to my DAL from my BLL or do this in my sproc (using GetDate() in SQL Server for example), or in others words is it better to get the date from the web server or the db server? What are the pros and cons of every approach? (in case you're wondering it's a website with a forums section and I want this for the thread adding code) Regards

      Waleed Eissa Software Developer Sydney

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      I don't think it matters unless you are worried the dates will differ. I'd use getdate b/c it's there and just works without passing anything in

      Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

      V 1 Reply Last reply
      0
      • C Christian Graus

        I don't think it matters unless you are worried the dates will differ. I'd use getdate b/c it's there and just works without passing anything in

        Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

        V Offline
        V Offline
        Vasudevan Deepak Kumar
        wrote on last edited by
        #3

        Christian Graus wrote:

        unless you are worried the dates will

        The time component might present a problem if the servers are distributed across geographically, unless the timezones are taken care of properly.

        Vasudevan Deepak Kumar Personal Homepage
        Tech Gossips
        A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson

        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