dbTalk Databases Forums  

TimeToText in a calculation

comp.databases.filemaker comp.databases.filemaker


Discuss TimeToText in a calculation in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Rick Altman
 
Posts: n/a

Default TimeToText in a calculation - 08-01-2003 , 03:34 PM






I have a confirmation letter that I send out that lists the names and
the times of courses that people have signed up for. Both of those two
pieces of information are in fields, but I DO NOT want to have to
place field boxes into the letter; I want to use Merge Field. I have
created a calculation whose key formula looks like this:

TimeToText(CourseTime) & ": " & CourseName

The problem is that the course time shows up as 12:30:00 which is just
about as anal as you can get! I tried adding a Left() to the formula,
but FileMaker barked at me (and besides, some of the times are at
12:30 and others at 3:00, so Left() wouldn't work).

How do I get rid of the seconds??





--
Rick Altman
The PowerPoint Live User Conference
October 12-15, 2003 | Tucson AZ
http://www.pptlive.com



Reply With Quote
  #2  
Old   
Bridget Eley
 
Posts: n/a

Default Re: TimeToText in a calculation - 08-01-2003 , 04:12 PM






Hi Rick

Don't convert the time to text within a calc. Concatenate the fields in the
merge field itself, eg:

<<Time>>: <<CourseName>>

Then format the time in the merge field using the Time command in the Format
menu.

Bridget Eley

in article 89AWa.43537$o%2.22086@sccrnsc02, Rick Altman at
rick.a (AT) nospamaltman (DOT) com wrote on 2/8/03 6:34 AM:

Quote:
I have a confirmation letter that I send out that lists the names and
the times of courses that people have signed up for. Both of those two
pieces of information are in fields, but I DO NOT want to have to
place field boxes into the letter; I want to use Merge Field. I have
created a calculation whose key formula looks like this:

TimeToText(CourseTime) & ": " & CourseName

The problem is that the course time shows up as 12:30:00 which is just
about as anal as you can get! I tried adding a Left() to the formula,
but FileMaker barked at me (and besides, some of the times are at
12:30 and others at 3:00, so Left() wouldn't work).

How do I get rid of the seconds??





--
Rick Altman
The PowerPoint Live User Conference
October 12-15, 2003 | Tucson AZ
http://www.pptlive.com




Reply With Quote
  #3  
Old   
Howard Schlossberg
 
Posts: n/a

Default Re: TimeToText in a calculation - 08-01-2003 , 07:49 PM



Use the merge fields as Bridget has suggested. Or if you really want it
all in a calc, you can try:
left(TimeToText(CourseTime), length(TimeToText(CourseTime))-2) & ":
" & CourseName

Rick Altman wrote:
Quote:
I have a confirmation letter that I send out that lists the names and
the times of courses that people have signed up for. Both of those two
pieces of information are in fields, but I DO NOT want to have to
place field boxes into the letter; I want to use Merge Field. I have
created a calculation whose key formula looks like this:

TimeToText(CourseTime) & ": " & CourseName

The problem is that the course time shows up as 12:30:00 which is just
about as anal as you can get! I tried adding a Left() to the formula,
but FileMaker barked at me (and besides, some of the times are at
12:30 and others at 3:00, so Left() wouldn't work).

How do I get rid of the seconds??





--
Rick Altman
The PowerPoint Live User Conference
October 12-15, 2003 | Tucson AZ
http://www.pptlive.com


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg (818) 883-2846
FM Pro Solutions Los Angeles, California
Associate Member, FileMaker Solutions Alliance



Reply With Quote
  #4  
Old   
Rick Altman
 
Posts: n/a

Default Re: TimeToText in a calculation - 08-02-2003 , 12:42 AM



Thanks, Bridget. I should have stated initially that it will be
difficult to do that. The calculation is actually a bit more involved
than I indicated:


If(IsEmpty(Course),"No Seminar Scheduled",
If( IsEmpty(GetRepetition(Course,2)) ,
TimeToText((CourseTime)) & ": " &
Course,
TimeToText(GetRepetition(CourseTime,1))
& ": " & GetRepetition(Course,1) & "¶ " &
TimeToText(GetRepetition(CourseTime,2)) & ": " &
GetRepetition(Course,2)))


I suppose I could create two calcs instead of one and use two calc'd
fields, one for time and one for course. I'm just surprised that I
would have to do that. I really would have thought that there would be
a way to format out the seconds within the calculation.





"Bridget Eley" <bridgeteley (AT) ihug (DOT) com.au> wrote

Hi Rick

Don't convert the time to text within a calc. Concatenate the fields
in the
merge field itself, eg:

<<Time>>: <<CourseName>>

Then format the time in the merge field using the Time command in the
Format
menu.




Reply With Quote
  #5  
Old   
Rick Altman
 
Posts: n/a

Default Re: TimeToText in a calculation - 08-02-2003 , 08:34 AM



I appreciate all of the help. In the final analysis, I scrutinized why
I was entering these times as times. I'll never be doing any
calculations against them; they are just informational. So I decided
to change the the fields to plain old text.

Problem solved... <s>




"Bridget Eley" <bridgeteley (AT) ihug (DOT) com.au> wrote

Howard suggest one calc that might help in this regard. Here is
another:




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.