Topic: Not Display date format

I need to create a report from an sql query with date fields. The problem is that in fast report I can not give the date field, long date format. In the SQL query the date field I do it as DATE (TABLE.CAMPOFECHA).

This is the query
SELECT 
EVENTOS.NOMBRE as nombre_evento,         
date(EVENTOS.FECHAINICIO)AS inicia_evento

Post's attachments

Attachment icon format1.png 26.59 kb, 285 downloads since 2018-01-29 

Re: Not Display date format

My Visual Database not support TDateTime data for FastReport (MVD uses text format for date), you should format date in the SQL query, example for SQLite:


SELECT  
EVENTOS.NOMBRE as nombre_evento,          
strftime('%d.%m.%Y',EVENTOS.FECHAINICIO) AS inicia_evento

But you can convert Date format to TDateTime using calculated field, after that you can format date using FastReport,

julianday(dateofbirth, 'localtime') - 2415018.5833333335

project example:

Post's attachments

Attachment icon TDateTime for report.zip 5.89 kb, 481 downloads since 2018-01-31 

Dmitry.

Re: Not Display date format

Thank you very much Dmitry.

Re: Not Display date format

What a shame Dmitry. When I testing it with Report (SQL) shows error message: no such column: employees.calc_TDatetime.

Post's attachments

Attachment icon f2.png 17.62 kb, 266 downloads since 2018-01-31 

Re: Not Display date format

I am sorry. I have already solved the problem