I've found this discussed in another thread, but can't seem to work it out. I'm trying to pull a date from Datablaze into a snippet. The date in Datablaze is formatted as MM/DD/YYYY, but I'd like it presented in the TextBlaze snippet as MMMM Do. I keep getting this error no matter what I do, or what combination I do it in " Could not parse "["2026-01-16"]" as a date or time with the pattern "MMMM Do"". Does anyone have any suggestions? I've pulled dates in other snippets, but it's just not working on this table, and I'm pulling my hair out!
Hey @COREY_CHARLE ,
It looks like the date is pulled from Data Blaze as a list. Try using the first item in it:
{date=["2026-01-16"]}
{time: MMM Do; at={=date[1]}}
That solved the formatting issue on the first try. Thank you! But now that I need to declare which line, I can't use a repeat to pull information from each line selected in the DB read table. Any suggestions?
{repeat: for item in terms}{=terms[1].shorthand}:{time: MMMM Do; at={=terms[1]["autoaccess opt out deadline"]}; pattern=YYYY-MM-DD}
{endrepeat}
Hi @COREY_CHARLE,
You can use iteration variables inside a repeat to access data in each row. Here's an illustration for the snippet you shared.
{repeat: for item in terms}{=item.shorthand}:{time: MMMM Do; at={=item["autoaccess opt out deadline"]}; pattern=YYYY-MM-DD}
{endrepeat}
Hi Ashwin. Could you please explain in layman's terms what the elements of the repeat function refer to. i.e. repeat for item in terms. Thank you, Tony
Hi @tonyd, sure.
In repeat for item in terms:
* terms = the whole list of rows from your table
* item = one row from that list at a time
For example:
{terms= ["Apple", "Banana", "Cherry"]}
{repeat: for item in terms}
{=item}
{endrepeat}
So item can be any word you choose and terms is the name given to the Read from function or a previously defined list?
Yes, item is just the loop variable that represents “one element at a time” from the list. terms is the variable that holds the list you’re looping over.