Home End User
New Blog Posts: Merging Reports - Part 1 and Part 2

What is the equivelent to copy in sql

edited September 2006 in End User
I would like to chop a date up in the Query Designer, Calc Tab, Expression.
for example

Date 31/12/2006
I need a new column on which I sort the report by which just has the '31'
part of the date in it.

This would be easy in rap but how do I do it as an expression

Please help

Many Thanks in Advance

Antony

Comments

  • edited September 2006
    Hi Antony,

    If your database supports SQL2 functions you can use the EXTRACT(part FROM
    source) method to get a part of a date. For instance it would look
    something like the following...

    EXTRACT(DAY FROM CURRENT_DATE)

    An equivalent to the copy routine in Delphi dealing with string values would
    be the SUBSTRING function in SQL.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited September 2006
    Thanks - for that worked a treat.
This discussion has been closed.