Results 1 to 5 of 5

Thread: 24h to 12h time and Hidden Window

  1. #1

    24h to 12h time and Hidden Window

    Well, quick question.. How do I get the current time, in HH:MMS form?
    And the date in any form?
    and the current day in the form of Monday, Tuesday, etc etc.

    ^^^^
    Just need to convert time from 24 hour to 12 hour time.


    And finally, how do I make a pascal window appear in the taskbar and NOT in the bar of programs? (above 3 q's more important )
    --MagicRPG--

  2. #2

    24h to 12h time and Hidden Window

    timeToStr(now()) returns current time
    dateToStr(now()) returns current date
    use DateTimeToString function to format in any way you like.

    dayOfWeek(now()) returns number of day where sunday = 1 and saturday 7

    Cant help you with the last question.

    PS. we're happy to help you, but this info can also be found in less than 10 seconds using google.

  3. #3

    24h to 12h time and Hidden Window

    Well, I was using the FPC site's documentation, but I just couldn't get a variable assigned with the DD/MM/YY value and not the TDateTime value... But that was because I thought the 'format' was required, which your post just told me it isn't

    So now I just need to find out how to hide windows... Like for example (probably not a pascal program...) but you know DU Meter? I need a program that runs in the background 24/7 like that, and having a bar on the bottom of the screen would just get in the way...

    EDIT: Also, how do I make the time come in 12-hour time and not 24 hour time? I'm looking on the help site right now, but if anyone knows the answer, it'll be quicker

    Ok, found that using am/pm as a time formatter, I can tell it to use 12 hour time, but how do I implement this to make it become equal to a variable in 12-hour form and not write it to screen?
    --MagicRPG--

  4. #4

    24h to 12h time and Hidden Window

    search this site also, I made a post soem time ago about the use of sysutils to do what you want.

    Have a look at it The format function also works for making 24 hour/12 hout clock etc etc etc and was also mentioned on same thread.

  5. #5

    24h to 12h time and Hidden Window

    http://www.pascalgamedevelopment.com...light=sysutils was the only post of yours I could find that covered that, and it didn't cover 24-12 hour time... Unless I'm missing something.
    --MagicRPG--

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •