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. from_unixtime in c#.net

from_unixtime in c#.net

Scheduled Pinned Locked Moved C#
csharpmysqltutorial
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.
  • H Offline
    H Offline
    Hari Om Prakash Sharma
    wrote on last edited by
    #1

    Is there from_unixtime() function in c#.net. If not, please guide me. its very urgent. In mysql from_unixtime() function is used to change int time to datetime format. like from_unixtime('1190452194')=Sep 22 2007 HH MM

    First and the Foremost: FIGHT TO WIN
    MySite:
    http://hariomprakash.info

    D D 2 Replies Last reply
    0
    • H Hari Om Prakash Sharma

      Is there from_unixtime() function in c#.net. If not, please guide me. its very urgent. In mysql from_unixtime() function is used to change int time to datetime format. like from_unixtime('1190452194')=Sep 22 2007 HH MM

      First and the Foremost: FIGHT TO WIN
      MySite:
      http://hariomprakash.info

      D Offline
      D Offline
      dengboo
      wrote on last edited by
      #2

      So far as I know, C# language has no specified function. But you can create a similar function your self.

      --------------------------------- Believe what you saw!

      H 1 Reply Last reply
      0
      • D dengboo

        So far as I know, C# language has no specified function. But you can create a similar function your self.

        --------------------------------- Believe what you saw!

        H Offline
        H Offline
        Hari Om Prakash Sharma
        wrote on last edited by
        #3

        what is the format of this type of time(integer)?

        First and the Foremost: FIGHT TO WIN
        MySite:
        http://www.hariomprakash.info

        1 Reply Last reply
        0
        • H Hari Om Prakash Sharma

          Is there from_unixtime() function in c#.net. If not, please guide me. its very urgent. In mysql from_unixtime() function is used to change int time to datetime format. like from_unixtime('1190452194')=Sep 22 2007 HH MM

          First and the Foremost: FIGHT TO WIN
          MySite:
          http://hariomprakash.info

          D Offline
          D Offline
          Daniel Grunwald
          wrote on last edited by
          #4

          This should do the trick: DateTime time = (new DateTime(1970, 1, 1)).AddSeconds(unixTime);

          H 1 Reply Last reply
          0
          • D Daniel Grunwald

            This should do the trick: DateTime time = (new DateTime(1970, 1, 1)).AddSeconds(unixTime);

            H Offline
            H Offline
            Hari Om Prakash Sharma
            wrote on last edited by
            #5

            Thank you so much...it works....!:)

            First and the Foremost: FIGHT TO WIN
            MySite:
            http://www.hariomprakash.info

            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