You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (Y_UNLIKELY(NUdf::MIN_DATETIME64 > value || value > NUdf::MAX_DATETIME64)) {
685
+
returnTStringBuilder() << "Error: value out of range for Datetime64: " << value << " (min: " << NUdf::MIN_DATETIME64 << ", max: " << NUdf::MAX_DATETIME64 << ")";
if (Y_UNLIKELY(NUdf::MIN_TIMESTAMP64 > value || value > NUdf::MAX_TIMESTAMP64)) {
702
+
returnTStringBuilder() << "Error: value out of range for Timestamp64: " << value << " (min: " << NUdf::MIN_TIMESTAMP64 << ", max: " << NUdf::MAX_TIMESTAMP64 << ")";
703
+
}
704
+
auto date = value / 86400000000ll;
705
+
value -= date * 86400000000ll;
706
+
if (value < 0) {
707
+
date -= 1;
708
+
value += 86400000000ll;
709
+
}
710
+
711
+
TStringBuilder out;
712
+
out << FormatDate32(std::chrono::sys_time<NYdb::TWideDays>(NYdb::TWideDays(date)));
713
+
out << 'T';
714
+
715
+
const ui32 time = static_cast<ui32>(value / 1000000ull);
0 commit comments