TeleFlow Forums
http://teleflow.org/phpbb/

Creating Consistent Date and Time String
http://teleflow.org/phpbb/viewtopic.php?f=10&t=338
Page 1 of 1

Author:  wlwoody [ Mon Mar 13, 2006 10:39 am ]
Post subject: 

During the entry of time by a caller, the time must have the format of HHMM. Since 7 O'clock may be entered as 0700 or 700, how should the entered time be forced consistently to a string of 4 positions such as 0700. This will be used to create a string such as yyyymmddhhmm for determining timing of an action. <br> <br>Is there a better way of doing this such as an existing time date function or flowchart available based on a 12 hour clock. <br> <br>Thanks for the reply...

Author:  Chris [ Tue Mar 14, 2006 3:30 pm ]
Post subject: 

Use the BasicScript step (refer to the TeleFlow manual, in the "BasicScript" chapter, which is a subchapter of the "1 - Develop Applications with TeleFlow Designer" chapter for help on the BasicScript step) to get the length (using the LEN function) of the string the user enters. <br> <br>If it is a length of 4, carry on. Otherwise, append your string to a "0". You might have to do other tests and string manipulation as well. For example, maybe the user will just enter 7. (although, you can give them instructions to enter the numbers a particular way, and if they don't, play a retry message and make them enter it again)

Page 1 of 1 All times are UTC - 8 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/