Date format and filtering date
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi All,
I need to filter data based on a invoice date. I need to see all transactions for specific month let's say Jan-22 in a data where I have invoices for multiple periods. My date format is 12/01/2023. I was trying to filter as below but getting error that date format is incorrect. How can I fix this?
Invoice date >= '2022-01-01'
AND
Invoice date <= '2022-01-31'
Many thanks for your help,
Aga
- Labels:
- Date Time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @aga123 ,
Your date is likely in a string field, you will need to convert it to a date first. Try this:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @aga123
Try this formula inside of your filter tool:
datetimeparse([Invoice date], '%d/%m/%Y') >= '2022-01-01'
AND
datetimeparse([Invoice date], '%d/%m/%Y') <= '2022-01-31'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @aga123
Please change the Invoice date to Alteryx date format YYYY-MM-DD and then use the filter.
Use datetime tool to achieve this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you all, I managed to fix the issue.
