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 / C++ / MFC
  4. Convert long to SYSTEMTIME

Convert long to SYSTEMTIME

Scheduled Pinned Locked Moved C / C++ / MFC
question
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.
  • Y Offline
    Y Offline
    ykutanoor
    wrote on last edited by
    #1

    Convert long to SYSTEMTIME long day =24,mm =4,year =1976; I need to convert day ,month,year to SYSTEMTIME. How?

    D _ 2 Replies Last reply
    0
    • Y ykutanoor

      Convert long to SYSTEMTIME long day =24,mm =4,year =1976; I need to convert day ,month,year to SYSTEMTIME. How?

      D Offline
      D Offline
      Dominik Reichl
      wrote on last edited by
      #2

      long day =24,mm =4,year =1976; SYSTEMTIME st; ZeroMemory(&st, sizeof(SYSTEMTIME)); st.wYear = (WORD)year; st.wMonth = (WORD)mm; st.wDay = (WORD)day; Best regards, :) Dominik


      _outp(0x64, 0xAD); and __asm mov al, 0xAD __asm out 0x64, al do the same... but what do they do?? ;) (doesn't work on NT)

      1 Reply Last reply
      0
      • Y ykutanoor

        Convert long to SYSTEMTIME long day =24,mm =4,year =1976; I need to convert day ,month,year to SYSTEMTIME. How?

        _ Offline
        _ Offline
        _moved
        wrote on last edited by
        #3

        you mean, day,mm,year are stored in one long ? asume year is stored in high word and day+month in low word: systime.wDay= (BYTE)lDate; // low byte low word systime.wMonth= (WORD)(lDate>>8)&0xFF; // hi byte systime.wYear= (WORD)(lDate>>16)&0xFFFF; //hi word you may change it depending on sequence in which values are stored in long

        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