Quantcast
Channel: VBForums - Database Development
Viewing all articles
Browse latest Browse all 2918

[RESOLVED] formatting date

$
0
0
I have this format to follow which is

A.TransDate between '2014-05-08 23:41:56' and '2015-05-08 23:41:56'

so if I code the dates I have this
A.TransDate between (date_format(mydatefrom,'%Y-%m-%d') + ' 00:00:00') and (date_format(mydateto,'%Y-%m-%d') + ' 23:59:59')

It seems there is a problem on that because there is no record return but running with this code with hardcoded dates A.TransDate between '2014-05-08 23:41:56' and '2015-05-08 23:41:56', it returned a record.

What is wrong there?

Viewing all articles
Browse latest Browse all 2918

Trending Articles