
Anonymous
Not applicable
2016-01-29
03:19 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Format Date 'YYYY-MM-DD' to 'YYYY-MM'
Hi,
i have big problem using QV script code. Im trying to change date from 2015-01-01 for 2015-01.
My field with Date is "Data".
I was trying to use formulas date(Data,'YYYY-MM') but still after exporting to excel it shows YYYY-MM-DD format.
I was also trying to use makedate function with year (year is 1905) and after that i received 1905-01-01.
Do you maybe have similar issue to mine?
Thank you in advance for your help,
Jacek Antek
2,620 Views
2 Replies

MVP
2016-01-29
07:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try this maybe:
Date(MonthStart(Date#(Data, 'YYYY-MM-DD')), 'YYYY-MM') as DateField
2,032 Views

Anonymous
Not applicable
2016-01-29
07:11 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you are fetching it from Excel, then do like this?
=date(date#(Data,'Excel Date Format'), 'YYYY-MM') as DataField
2,032 Views
