Icon

12 hour to 24 hour times V2

Additional work, and some modifications to existing rule nodes needed to determine if a 12 represents noon or midnight.12 noon is detected by it being a 12 but there being an earlier record for same date with an earlier hour.If the data set doesn't have sufficient data to correctly infer this, then the results will be incorrect. Sample dataConcatenate date and timestrings with a space betweenGet differencein minutes from previousrecordGet previousrecord datetimed/M/yyyy k:mm(k rather than h used as we need it to recognise 1-12 but we don't have an am/pm indicator)If difference from previous is negative, and we've determinedit was noon thenwe have moved to afternoon, so mark as 12 hoursto add(MODIFIED)Get DATEfrom previous rowIf the date haschanged from previous row, itis now morning,so mark as 0 hoursto add(MODIFIED)For all the "missing" hoursto add, copy downfrom previous recordshift time forwardby "hours to add"tidy upSplit out the hours"Cross-joins" all recordsfor same dateFind 12 noon"HOUR"sequential counter forcomparing times and retaining row orderretain only"12 noon" recordsquick wayof gettingdistinct setof records withnoon indicatorsremaining recordsmarked as not12 noonDetermine for each"12" whether to subtract 12 hours (if not noon)or add 0 hours (if noon)join back"noon"databack intooriginal orderGet previousrecord noon indicator Table Creator Column Aggregator Date&TimeDifference Lag Column String to Date&Time Rule Engine Lag Column Rule Engine Missing Value Date&Time Shift Column Filter Regex Split Joiner Rule Engine Column Rename Counter Generation Row Filter GroupBy Rule Engine Rule Engine Joiner Sorter Lag Column Additional work, and some modifications to existing rule nodes needed to determine if a 12 represents noon or midnight.12 noon is detected by it being a 12 but there being an earlier record for same date with an earlier hour.If the data set doesn't have sufficient data to correctly infer this, then the results will be incorrect. Sample dataConcatenate date and timestrings with a space betweenGet differencein minutes from previousrecordGet previousrecord datetimed/M/yyyy k:mm(k rather than h used as we need it to recognise 1-12 but we don't have an am/pm indicator)If difference from previous is negative, and we've determinedit was noon thenwe have moved to afternoon, so mark as 12 hoursto add(MODIFIED)Get DATEfrom previous rowIf the date haschanged from previous row, itis now morning,so mark as 0 hoursto add(MODIFIED)For all the "missing" hoursto add, copy downfrom previous recordshift time forwardby "hours to add"tidy upSplit out the hours"Cross-joins" all recordsfor same dateFind 12 noon"HOUR"sequential counter forcomparing times and retaining row orderretain only"12 noon" recordsquick wayof gettingdistinct setof records withnoon indicatorsremaining recordsmarked as not12 noonDetermine for each"12" whether to subtract 12 hours (if not noon)or add 0 hours (if noon)join back"noon"databack intooriginal orderGet previousrecord noon indicatorTable Creator Column Aggregator Date&TimeDifference Lag Column String to Date&Time Rule Engine Lag Column Rule Engine Missing Value Date&Time Shift Column Filter Regex Split Joiner Rule Engine Column Rename Counter Generation Row Filter GroupBy Rule Engine Rule Engine Joiner Sorter Lag Column

Nodes

Extensions

Links