Show prior date in flex while date in database is different

CCBRONET
CCBRONET used Ask the Experts™
on
I am trying to view the date of birth that i retrieve from a MySQL database,
For Eg.

The DOB in the DB is: 30/12/1984
But when I retrieve the date from the DB to view it on my flex page it shows me the prior date 29/12/1984.

I am bit confused about this phenomena as it happens for a few records......

Thanks In Advance,
Savio Coelho.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
I think your converting the calender format to date format ....
or some sec:min convertion you will do while give print to screen so that only this ....

thats is the pblm

Author

Commented:
Hi

I think that could be the problem....when I try to print the date in flex via alert popup....
The Date I get if the data is proper: Mon Oct 6 00:00:00 GMT+0530 1969
But when its wrong its like this: Mon Oct 5 10:59:00 GMT+0530 1969

Some kind of HH:mm value is getting appended.....How do I solve this???


Thanks,
Savio Coelho.
convert this in to correct date format and use locally

Author

Commented:
Hi

Could you please elaborate

Regards,
Savio Coelho.
Commented:
Use MYSQL-function DATE_FORMAT() to retrieve your birthdate without time information, e. g. somehow like this...

SELECT DATE_FORMAT(t.birthdate,'%d/%m/%Y') as birthdate FROM table t

Your problem should no longer appear, if it was caused by wrong, internal time conversions...

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial