Archive

Archive for April, 2012

Infor Prepares to Roll out ‘Mongoose’ Development Platform

April 24th, 2012 No comments

This is coming out of PCWorld.  Looks pretty positive to our Syteline fellow.

Infor Prepares to Roll out ‘Mongoose’ Development Platform

Categories: Development Tags:

Syteline Financial Excel Add-in: How to reference unit codes with mixed cell references and hard-coded values

April 14th, 2012 No comments

When specifying unit codes in the Excel formulas, to use both a cell reference in addition to hard-coded values, you need to append the two with ‘&’.  For example, if unit code 1 value is in cell $A$1, and you don’t want to include * for each of the three remaining unit codes, the Unit Code parameter would look like: $A$1 & ",*,*,*".  In a SLGL formula, that would look like:

=SLGL(account, period, year, $A$1 & ",*,*,*")

Categories: Development Tags:

Get Only Date from DateTime

April 4th, 2012 No comments
SELECT DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE()))

There is also a few useful UDF(User Defined Function) in Syteline

ConvDate (@pInputDate  DateType, @pFormat   NVARCHAR(10))

Sample

SELECT ConvDate(GetDate(), ‘MM/DD/YYYY’)

Another useful one, DayEndOf

ALTER FUNCTION [dbo].[DayEndOf] (

  @Date DATETIME

) RETURNS DATETIME

AS

BEGIN

    –  This function takes the input date and extends the time portion forward

    — to the last possible moment of that day, just before midnight of the next day.

    — A null in yields a null out. It is useful for doing

    — high-range comparisons where only the day matters and offers an alternative to the

    — DATEDIFF built-in. The first 4 bytes of a datetime field are the date and

    — the second four the time.

   
    RETURN case when @Date = CONVERT(DATETIME, ‘9999-12-31 23:59:59.998’, 121) then @Date

       else dateadd(ms, -2, dbo.MidnightOf( dateadd(day, 1, @Date) ) )

       end

END

Categories: Development, SQL Tags: