String: Extract two middle characters
- 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,
I have the following string: "210617". That is 21= 2021, 06= Jun and 17=day.
Which is the formula to extract "06" ?
I used right with 2 in order to get the day and I used left with 2 in order to get the year, but I canĀ“t find the formula to extract "06"
Regards,
Igancio
Solved! Go to Solution.
- Labels:
- Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You can do this in a simple formula:
substring(tostring([Text]),2,2)
Hope this helps,
M.
- 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
Since you are probably running datetime calculations on it - why not just convert it to a date via datetimeparse("20"+tostring([field1]),"%Y%m%d")
then you can use datetimeformat([date],"%m") to get the month and do all those fun datetime calculations...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you both !! š
Actually I was trying something like +mid as I use in Excel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
