forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


AM PM clock

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
filip
Valued Contributor
Valued Contributor


Joined: 07 Aug 2004
Posts: 340

PostPosted: Sat Jan 28, 2006 11:37 am    Post subject: AM PM clock Reply with quote

I like to mask or convert time to AM PM standard

This code is original from Hooligan... Cool

Code:
Title TimeTest
  %%now = @datetime(hh:nn)
  %%rawtime = @datetime()
  %%rawhour = @fdiv(1,24)
  %%rawminute = @fdiv(1,1440)
  DIALOG CREATE,Timetest,-1,0,240,243
  DIALOG ADD,SPIN,SPIN1,65,135,73,24,0|24,0,,CLICK
  DIALOG ADD,SPIN,SPIN2,94,139,69,24,0|60,0,,CLICK
  DIALOG ADD,TEXT,Time1,30,130,,,%%now
  DIALOG ADD,TEXT,newtime1,142,139,,,%%now
  DIALOG ADD,BUTTON,BUTTON1,184,94,64,24,ok
  DIALOG ADD,TEXT,TEXT1,71,48,,,hours
  DIALOG ADD,TEXT,TEXT2,103,51,,,minutes
  DIALOG ADD,TEXT,TEXT3,32,42,,,Start time -
  DIALOG ADD,TEXT,TEXT4,146,42,,,New time -
  DIALOG SHOW
:Evloop
  wait event 
  goto @event()
:SPIN1CLICK
:SPIN2CLICK
  %h = @dlgtext(spin1)
  %m = @dlgtext(spin2)
  %%newhour = @fmul(%%rawhour,%h)
  %%newminute = @fmul(%%rawminute,%m)
  %%newrawtime = @fadd(%%rawtime,@fadd(%%newhour,%%newminute))
  %%newtime = @datetime(hh:nn,%%newrawtime)
  dialog set,newtime1,%%newtime
  goto evloop
:BUTTON1BUTTON
 
:Close
  exit


If windows are set to AM PM nothing is change if use this code so windows looks like they are using mask clock (bios have full normal).
Back to top
View user's profile Send private message Send e-mail
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Sun Jan 29, 2006 1:22 am    Post subject: Reply with quote

i haven't looked at your code but wanted to let you know that there is a date and time dll that may do for you what you want, do a search for it at www.vdsworld.com

serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group