Hi Christopher,

> I'm trying to do something really simple here, sorry if this is a stupid
> question.
> 
> I have a table storing sale information (sales). The date field is formatted
> as "12/02/08 11:31:00" (today's date).
> 
> I want to query the table and get all the sale information, only I want the
> date format to be "12/08" or similar - I'll later be using this to make
> monthly totals, etc.
> 
> From what I understand, this is easy to do in Access. Is Base (3) capable of
> this?

Formatting is not done within the SQL statement. Instead, you have the
full power of all formats which e.g. Calc is capable of in Base. For
this, you can, when displaying a table/query, choose "Format" in the
column's context menu. This would also allow you to format a date column
as YY/MM.

However, since you talk about processing this further, this might not be
what you need. If I understand this correctly, you want to re-use the
formatted month in further statements. In this case, it's not a
formatting what you need, but a extract from the data, e.g. "MONTH(
<sales_date> )".

Of course such functions could also be used to create a string which has
the date formatted as you want:
  SELECT YEAR( <sales_date> ) || '/' || MONTH( <sales_date> )
  FROM <sales>
.

Ciao
Frank


-- 
- Frank Schönheit, Software Engineer         [EMAIL PROTECTED] -
- Sun Microsystems                      http://www.sun.com/staroffice -
- OpenOffice.org Base                       http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to