Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, July 8, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Administration Forums - General Administration
Forum to discuss general administration topics for SalesLogix (including LAN & remote topics). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to General Administration | New ThreadView:  Search:  
 Author  Thread: QueryBuilder calcualted fields
Steve Harris
Posts: 16
 
QueryBuilder calcualted fieldsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Feb 07 12:00 PM
fiogf49gjkf0d
Is there any way to subtract to dates. (DATEDIFF doesn't work.)

I would like to subtract the create date from NOW() to get the number of days since the record was created.

Thanks,
Steve
[Reply][Quote]
Deb R
Posts: 14
 
Re: QueryBuilder calcualted fieldsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Feb 07 1:28 PM
fiogf49gjkf0d
Quote:
Originally posted by Steve Harris

Is there any way to subtract to dates. (DATEDIFF doesn't work.)

I would like to subtract the create date from NOW() to get the number of days since the record was created.

Thanks,
Steve


Where are you trying to do this?
Are you using it in sql, Crystal Reports or in a script in Architect?

'Now' is not a recognized function name in sql.

If you want to get the number of days since a record was created in sql you would need to use:
DATEDIFF(dd,CreateDate, Current_TimeStamp)

In both Crystal and Basic syntax in Crystal reports, Now returns the current time.
It is equvalent to the function CurrentTime.

To find the difference between two dates in Crystal Reports use:
DATEDIFF ("d", {ACCOUNT.CREATEDATE}, CurrentDate)

I am still learning the scripting used in Architect, but you can try either of the previous options and go from there. Check the help files. They usually (not always) have good information.

[Reply][Quote]
Marc Johnson
Posts: 252
 
Re: QueryBuilder calcualted fieldsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Feb 07 10:51 AM
fiogf49gjkf0d
Correct me if I'm wrong, but you are trying to created a calculated field for use with in the Query Builder tool to create a group with certain criteria, right?

I've found DaysOpen, a CF for the Opportunity table does a simple; sysdate-Opportunity.Dateopened.
This worked for me. If you add this to your layout grid you'll want to change the Format Type to Number and add a %2.0% to the Format field. This'll limit your 'days' to whole numbers. If you don't you'll get some crazy decimal values that aren't likely to make sense to most people. How much is 0.017235 days in hours or minutes? Sure it can be calculated but do you want to?

Hope that helps.
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 7/8/2025 12:39:51 PM