[11.1]
Starting with a DateObject in a Dataset:
data = Dataset[<|"a" -> Now|>]
and then applying DateString
d = data /. date_DateObject :> DateString[date]
we find that d["a"] evaluates to a String. However, Normal[d]gives <|"a" -> DateString[DateObject[...]]|>. So I have two questions:
- Why doesn't
DateString[DateObject[...]]evaluate to aStringwithin theDatasetor theAssociation? - Is there a way to force it to evaluate upon application of the
ReplaceAll, so that the value of"a"in theDatasetand theAssociationis aString?
ds[All, DateString]? – J. M.'s missing motivation Mar 31 '17 at 13:10Associationitself (rather thanDataset). See Problem Using Evaluated Replace with Associations. As noted in that question, a work-around isdata /. date_DateObject :> RuleCondition@DateString[date]. – WReach Mar 31 '17 at 14:23