Oct 29, 2003 #1 joethehoe Technical User Jan 2, 2002 27 US Does anybody know how to convert: TimeValue ({mo_agent_unit.tdTime}) to a number?? I seen a number of differnt ways to convert numbers to time but not back to a number. something like 5:00:00am and 5:30:00am to 05 and 05.5 Help, Help!!
Does anybody know how to convert: TimeValue ({mo_agent_unit.tdTime}) to a number?? I seen a number of differnt ways to convert numbers to time but not back to a number. something like 5:00:00am and 5:30:00am to 05 and 05.5 Help, Help!!
Oct 29, 2003 #2 pandpp Programmer Sep 17, 2003 110 AU How about: numberVar intHours := Hour({VP_USERACCOUNT.PWDUPDATEDTM}); numberVar intMinutes := Minute({VP_USERACCOUNT.PWDUPDATEDTM}); numberVar intSeconds := Second({VP_USERACCOUNT.PWDUPDATEDTM}); intHours + (intMinutes / 60) + (intSeconds / 3600) Peter. Upvote 0 Downvote
How about: numberVar intHours := Hour({VP_USERACCOUNT.PWDUPDATEDTM}); numberVar intMinutes := Minute({VP_USERACCOUNT.PWDUPDATEDTM}); numberVar intSeconds := Second({VP_USERACCOUNT.PWDUPDATEDTM}); intHours + (intMinutes / 60) + (intSeconds / 3600) Peter.
Oct 30, 2003 #3 synapsevampire Programmer Mar 23, 2002 20,180 US What kind of number, seconds? Hour({VP_USERACCOUNT.PWDUPDATEDTM})*3600+ minutes({VP_USERACCOUNT.PWDUPDATEDTM})*60 +Second({VP_USERACCOUNT.PWDUPDATEDTM}) Sorry, I don't have Crystal in front of me to test syntax, but this is the theory. -k Upvote 0 Downvote
What kind of number, seconds? Hour({VP_USERACCOUNT.PWDUPDATEDTM})*3600+ minutes({VP_USERACCOUNT.PWDUPDATEDTM})*60 +Second({VP_USERACCOUNT.PWDUPDATEDTM}) Sorry, I don't have Crystal in front of me to test syntax, but this is the theory. -k
Oct 30, 2003 #4 Ngolem Programmer Aug 23, 2001 2,724 CA you can change time into any kind of number you want....you will have to be more specfic as to what kind you want. SV showed you how to do it for seconds, Pandpp showed you converted to hours... Other possiblities are minutes, seconds from the start of the year .... and many more...you have to be specific in your wish Jim Broadbent The quality of the answer is directly proportional to the quality of the problem statement! Upvote 0 Downvote
you can change time into any kind of number you want....you will have to be more specfic as to what kind you want. SV showed you how to do it for seconds, Pandpp showed you converted to hours... Other possiblities are minutes, seconds from the start of the year .... and many more...you have to be specific in your wish Jim Broadbent The quality of the answer is directly proportional to the quality of the problem statement!