Nothing helps.
I’ve changed values to int, and tried "$Value + 0". Something like this:
$Value = $myresource->getTVValue('MyTvWithNumericValue');
$Value = intval($Value);
$Value = $Value + 0;
$tv = $modx->getObject('modTemplateVar',array('name'=>'MyTvWithNumericValue'));
$tv->setValue($DocId, $Value);
$tv->save();
Even tried to add zeros to a string value, hopeless, really not good method
Think there are two ways:
1 To sort element after getting these into an object array (somehow)
2 Change TV date type in modx (it’s obviously not correct)
Realy hope that sorting problems will be solved. Revolution ditto have some issues with sort too.