MS Query - STANDARD DATE to YEAR-MONTH

  • Thread starter Thread starter papegoja
  • Start date Start date
P

papegoja

Hi,
I am using MS Query to pull some data from an SQL database.

Hopefully someone can help me with a problem thats been bothering me
for some time now.

I have a Tabel containg a field with dates.
This field is in standard date format (European): YYYY-MM-DD

I would like to get this data in the following format: YYYY-MM

I can´t use MS Access, don´t have it at work.

I´m no superuser when it comes to SQL programing. And there is no
format-settings inside MS Query.

I don´t want to do a reformat in Excel. Becouse I am going to use the
data directly in a PivotTable. And want each transaction month per
month. Instead of day per day has it is now.

Hope someone can help.

Best regards
/Dani
 
Excel will do this for you automatically without converting your data.
See Pivot Table Grouping under help. Be sure when specifying your PT
data range that you have a valid date in every record. You won't get
the date group option if you have a record whose date field is a blank
or a non-date data type.
 
Back
Top