SOLVED
Date format
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
tww
8 - Asteroid
‎03-29-2023
03:33 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi all,
How could I format/extract the following value so I can get 2 separate values for the weekday and date.
Wed Aug 31 23:30:17 CDT 2022
Output
Wed | 08/31/2022 |
Thank you
Solved! Go to Solution.
Labels:
- Labels:
- Transformation
4 REPLIES 4
Yoshiro_Fujimori
15 - Aurora
‎03-29-2023
03:59 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@tww ,
DateTime functions can handle date and time very frexibly.
https://help.alteryx.com/20223/designer/datetime-functions
Used formula
Date = DateTimeParse([Data],"%a %b %d %H:%M:%S CDT %Y")
DayOf Week = DateTimeFormat([Date],"%a")
Date2 = DateTimeFormat([Date],"%m/%d/%Y")
Workflow
Output
Good luck!
martinding
13 - Pulsar
‎03-29-2023
04:02 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @tww ,
You can try the following approach:
1. Parse the string to datetime format
2. Format the datetime into the parts you want (e.g. day of week, year, date)
‎03-30-2023
07:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you, @Yoshiro_Fujimori
‎03-30-2023
07:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you, @martinding