Solved

date always display 31 Dec 1899

Posted on 2004-10-30
155 Views
Last Modified: 2013-12-24
Coldfusion MX
MS SQL 2000

Query:
<CFSET BEGINDATE = 0>

when try to output it displays:
<cfoutput>#begindate#</cfoutput>

the date always display 31 Dec 1899. What should i do, I am stuck.
Please let me know if you need complite code. There is no error.
0
Question by:matlowson
    2 Comments
     
    LVL 22

    Accepted Solution

    by:
    hello,
    this is your problem
    <CFSET BEGINDATE = 0>
    When you do this it will always set it to 31 Dec 1899. As this is default value for windows or coldfusion

    what date you want you should do soemthing like this...

    <cfset begindate = now()>

    you can also use dateforma from http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/functi59.htm#wp1103264
    Regards,
    ---Pinal
    0
     

    Author Comment

    by:matlowson
    I guess I figured it out. Your answer helped me partially. Also no other expert have any comments here. I will close the question soon.
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
    Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
    The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…
    The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…

    934 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now