If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Crystal Reports > Need formula to place decimal point on number field

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-20-06, 08:23
lewispi lewispi is offline
Registered User
 
Join Date: Jan 2006
Posts: 10
Need formula to place decimal point on number field

I have a set of numbers that I am concatenating in a formula. The numbers comes over with a decimal point and following zero's. I just want to remove the decimal point and the zero's and have a whole number only. This has to be added to my formula.

Example: {PHPACCT.AAMMM} & "/" & {PHPACCT.AAMDD} & "/" & {PHPACCT.AAMCY}
Reply With Quote
  #2 (permalink)  
Old 06-20-06, 14:23
kledwell kledwell is offline
Registered User
 
Join Date: Jun 2006
Posts: 2
From your example it looks like these numbers are being treated as strings, is that the case or are these actually numeric fields?There are different ways of doing this depending on what data type you are dealing with. If these are actually numeric fields and you are trying to format a date (that's what it looks like) you can use the DateSerial function.

DateSerial(YYYY, MM, DD)

or with your example:
DateSerial({PHPACCT.AAMCY},{PHPACCT.AAMMM},{PHPACC T.AAMDD});

Last edited by kledwell; 06-20-06 at 14:44.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On