Date Lookup fields show incorrect formatting

Please report bugs and any annoyances here. Kindly include all possible details: steps to reproduce, expected result, actual result, screenshots, ... etc.
Post Reply
soltec1
Posts: 12
Joined: 2013-11-13 16:01

Date Lookup fields show incorrect formatting

Post by soltec1 » 2013-12-08 05:44

I have a table with 3 lookup fields that pull dates from another table.

I get two errors

1) IN list view - The first lookup field shows the correct UK format dd-mm-yyyy, but the other 2 show as yyyy-mm-dd...

2) Also the lookups in form view for another table all default to 01/01/70..any significane to this date?

Any ideas on these two problems

Ive tried setting the data format to UK, but it seems only the first lookup field for dates work?

Any helpers appreciated

soltec1
Posts: 12
Joined: 2013-11-13 16:01

Re: Date Lookup fields show incorrect formatting

Post by soltec1 » 2013-12-15 23:22

SOLUTION

Added this code to the tablename_view.php for the field name "dob" (date of birth)

Code: Select all

"IF(    CHAR_LENGTH(`Client1`.`dob`), CONCAT_WS('',   DATE_FORMAT(`Client1`.`dob`,'%d-%m-%Y')), '') /* Clientdob */" => "clientdob",

apirnar
Veteran Member
Posts: 40
Joined: 2013-04-15 17:06

Re: Date Lookup fields show incorrect formatting

Post by apirnar » 2014-10-12 14:42

I am also having the second problem.
The date referenced lookup from another table displays as 1/1/1970 in detail view.

Data integrity is safe but confuses users if this is not a bug what setting might be wrong?
If this is a bug I'd rather not hand code any workarounds if at all possible and would hope for a speedy fix.

I am using version 5.30 revision 638.
Thanks.

apirnar
Veteran Member
Posts: 40
Joined: 2013-04-15 17:06

Re: Date Lookup fields show incorrect formatting

Post by apirnar » 2015-01-19 23:18

Hello Ahmad,
This issue is still unresolved.
Could you please indicate if this is a bug or not?
I was hoping it would be resolved in the new release and it hasn't.

The project is set to display dates as day/month/year.
Phpadmin shows dates in parent record as year-month-day which is correct.
All fields are set to no special formatting.
The record ID of the parent referenced by the children record is correct for all fields referenced.
But: Dates appear either as 1/1/1970 or with month/day reversed in detail view.
I've really run out of ideas. I've deleted and regenerated the whole application. The problem persists.

Any answer would be appreciated as it is becoming an issue.
Thanks.

Post Reply