Skip to main content
Inspiring
August 26, 2013
Answered

cfretunr date format

  • August 26, 2013
  • 2 replies
  • 660 views

I use CFRETURN in my CFFUNCTION in cfc file.

My query return date format is 2012-07-04, CFRETURN Jul, 04 2012 00:00:00

I would like to return to my client what is query exactly return like 2012-07-04.

Are there any work around for this?

Your help and information is great appreciated,

Regards,

Iccsi,

    This topic has been closed for replies.
    Correct answer Steve Sommers

    I'm not really sure what you are asking. DateFormat() and TimeFormat() will return a date in any format you want. CFReturn in and of itself has nothing to do with a date format?

    2 replies

    Inspiring
    August 26, 2013

    You should not do this. The point at which you should be doing formatting of things like dates and numbers when you output them in your view. You should not have your model returning already-formatted values. Models should just return the data: the view should make whatever formatting adjustments the data needs for presentation.

    --

    Adam

    Steve SommersCorrect answer
    Legend
    August 26, 2013

    I'm not really sure what you are asking. DateFormat() and TimeFormat() will return a date in any format you want. CFReturn in and of itself has nothing to do with a date format?

    iccsiAuthor
    Inspiring
    August 26, 2013

    Thanks a million for helping and information,

    Regards,

    Iccsi,