add FT::date_only, FT::time_only and FT::no_time_zone flags
This commit is contained in:
@@ -602,7 +602,26 @@ void BaseExpression::esc(long double val, pt::TextStream & stream, const FT & fi
|
||||
|
||||
void BaseExpression::esc(const pt::Date & date, pt::TextStream & stream, const FT & field_type)
|
||||
{
|
||||
stream << date;
|
||||
if( field_type.is_date_only() )
|
||||
{
|
||||
date.SerializeYearMonthDay(stream, false);
|
||||
}
|
||||
else
|
||||
if( field_type.is_time_only() )
|
||||
{
|
||||
date.SerializeHourMinSec(stream);
|
||||
}
|
||||
else
|
||||
{
|
||||
if( field_type.is_no_time_zone() )
|
||||
{
|
||||
date.Serialize(stream);
|
||||
}
|
||||
else
|
||||
{
|
||||
date.SerializeISO(stream);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user