Skip to main content
Mar 2, 2009 4:48 PM UTC
Question

Error in createdatetime

<cfset schedindtl.presstime = 230>
<cfset schedindtl.pressdate = 20090308>
<cfset pressstart = #createdatetime(mid(schedindtl.pressdate,1,4),mid(schedindtl.pressdate,5,2),mid(schedindtl.pressdate,7,2),int(schedindtl.presstime/100),int(right(tostring(schedindtl.presstime),2)),0)#>
pressstart = #pressstart#

Looks like daylight savings time problem. Looking for help in fixing.
    This topic is closed to new replies. Start a new post to keep the conversation going.

    27 replies

    Mar 2, 2009 5:55 PM UTC
    Here is the error.
    Date value passed to date function CreateDateTime is unspecified or invalid.
    Specify a valid date in CreateDateTime function.

    Translate
    Inspiring
    Mar 2, 2009 7:02 PM UTC
    quote:

    Originally posted by: djl2445
    Here is the error.
    Date value passed to date function CreateDateTime is unspecified or invalid.
    Specify a valid date in CreateDateTime function.



    You are passing it a string. Not sure why it work for Adam and not for you.
    Translate
    Inspiring
    Mar 2, 2009 4:58 PM UTC
    > Looks like daylight savings time problem. Looking for help in fixing.

    It'd help if you posted what error you're getting.

    That code works fine for me.

    You don't need the pound-signs on the third line, btw. This will not
    impact your situation at all, but it makes your code look tidier.

    --
    Adam
    Translate