Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Date won't show up

Explorer ,
Apr 29, 2008 Apr 29, 2008
I have no idea why the date field "#LSDateFormat(qRegisteredStudentsMonth.eventDate,'M/DD/YY')#" --line 29 won't show up in the html. I KNOW that the data is there in the database.

Any help would be appreciated!!
395
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Apr 29, 2008 Apr 29, 2008
Problem solved. gave the database the once over and found someone had added a eventDate field to another table. This field was completely empty. Wonder why CF didn't bring up duplicate field name errors.....
Translate
LEGEND ,
Apr 29, 2008 Apr 29, 2008
What happens when you cfdump the query? For what it's worth, this line
where tbl_eventRegistration.eventDate LIKE '#URL.month etc
suggests that you are storing dates as text which makes your data much less useful than if you stored them as dates.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 29, 2008 Apr 29, 2008
The dump comes back as [empty string] The data is actually being stored as date/time and not as text. I'm fairly new to Coldfusion (started about two weeks ago) and just needed a quick and dirty way to pull all records for that month.(hence the LIKE wildcard statement) Seemed to work, until the date didn't show up.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 29, 2008 Apr 29, 2008
LATEST
Problem solved. gave the database the once over and found someone had added a eventDate field to another table. This field was completely empty. Wonder why CF didn't bring up duplicate field name errors.....
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 29, 2008 Apr 29, 2008
Spirit_Filled wrote:
> WHERE tbl_eventRegistration.eventDate LIKE '#URL.month#/%/#URL.year#'

unless eventDate is a char/varchar data type, i don't believe this will produce
any results.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources