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
O

Olle Jonsson

@Olle Jonsson
About
Posts
3
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How do I convert to and from UNIX standard epoch date numbers?
    O Olle Jonsson

    I regret that I am now working with VB6, and I'm also sorry I didn't include that into my first posting. I bow my head in shame. DateAdd() is my next stop, I guess. Yep, it was! Public Function GetEpochToDate(ByVal seconds As Long) As Date   GetEpochDate = DateAdd("s", seconds, CDate("1970-01-01 00:00:00")) End Function Public Function GetDateToEpoch(ByVal theDate As Date) As Long   GetDateToEpoch = DateDiff("s", CDate("1970-01-01 00:00:00"), theDate) End Function Thank you, Matt!

    Visual Basic question perl help

  • How do I convert to and from UNIX standard epoch date numbers?
    O Olle Jonsson

    After doing a nice function to calculate how many seconds have elapsed since 1970-01-01 00:00:00 a workmate came by and whistled that I should do a DateDiff() DateDiff("s", CDate("1970-01-01 00:00:00"), Now) Which was correct. Sigh. I'll try and make the other conversion, now. From seconds into days and years and months and... See you. Olle, Shamed in a corner, Lund, Sweden

    Visual Basic question perl help

  • How do I convert to and from UNIX standard epoch date numbers?
    O Olle Jonsson

    This is my first time here, so: hi guys! Hope your day does not suck. Mine is OK, but I'm banging my fragile head against a problem with converting UNIX standard epoch numbers to something fairly regular, date-wise. I receive a timecode from a Perl program, written as seconds since 1970, the standard way of talking about time in the UNIX world. Then my VB component wants to log this thing, and well, I'd like to be able to record it like YYYY-MM-DD HH:MM, but so far I am stumped. Some gotchas (add to this list if you can come up with more difficulties that could crop up during the writing of such a function): * leap years A few examples of timecodes from the last few weeks: 1054746806 1054555725 1056715898 OK, that is my question. Have you done this before? Have a nice day, folks. Olle Lund, Sweden

    Visual Basic question perl help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups