It is working for me, and evaluates to 1/1/2011. What are you expecting as the result? Once its parsed, you can change the default date format by right clicking the new field in the data window>>Default Properties>>Date Format.
Here's my workbook, I created a String based on your format and then parsed it. Is there a problem with the String field, meaning is it being recognized properly to begin with?
DateParse ML.twbx 958.9 KB
For some reason it limits the data to January only on all the years that I have. I've made sure the date was in the right format.
Not sure what's going wrong
Post a randomized sample of your raw data in a Tableau packaged workbook so we can take a look.
Looks like capital M's make the difference here--see attached.
Use: DATEPARSE("yyyyMM", [Date]) and it seems to work properly. I noticed that the M for months was capitalized in the examples I looked at.
Dates test ML.twbx 32.1 KB
That's great thanks, it worked.
Now I can't help but think that this is a flaw on the description provided. If Tableau enforces a format they should make it clear.
I can start playing about with it now.
No worries--please mark the question as "answered" in some way so other helpers know you've found a solution; thanks!
I agree that documentation, in general, is lacking. But all variations of month listed at the link above, month is capitalized.
The Tableau knowledgebase article Matthew referenced links to this reference containing the full description of the data formatting symbols and their interpretations: Formatting Dates and Times - ICU User Guide
M is used for Month in Year, with these values
M or MM - 09
MMM - Sept
MMMM - September
MMMMM - S
m is for minutes in hour, a la
m - 4
mm - 04
The Tableau doc does show a couple of examples using 'm' for minutes, but it could do a better job calling out these top level elements, leaving it up to the reader to spot the M/m distinction invites confusion.
RESOLVED: I used this dateparse("MMM dd, yyyy KK:mm a",[Send Date])
Hey Matt, I'm having trouble with the am / pm designation at the end of the string.
Send Date is formatted as a string like so: Apr 01, 2011 02:30 pm
I'm trying to convert to date using dateparse("Mmm dd, yyyy hh:mm ??",[Send Date])
What do I do about the question marks? Maybe there are other errors, too...
Is this the relevant page to tell me the symbols? I tried using this just now with no success.
Thanks Pooja! I updated my post; I figured it out.
On Thu, Aug 6, 2015 at 7:41 AM, Pooja Gandhi <