Using DoDateTime

Posted on 2005-05-10
Last Modified: 2012-05-05
Utilizing "DoDateTime" as inserted with Dreamweaver, I am attempting to find a way to pull a part of a date out...

right now I have this: <%= DoDateTime((AFC_Results.Fields.Item("AFC_date").Value), 4, -1) %>

I want to pull JUST the YEAR out, and display the date as YYYY... any ideas?
Question by:NickJPhillips
    1 Comment
    LVL 48

    Accepted Solution

    You need to customize your function...

    try like either:

    <%= right("0000" & Year(AFC_Results.Fields.Item("AFC_date").Value), 4)%>


       function getYYYY(v)
         on error resume next
         getYYYY = right("0000" & Year(v), 4)
       end function



    <%= getYYYY(AFC_Results.Fields.Item("AFC_date").Value) %>

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Course: Create Mobile App Prototypes with Adobe XD

    This is a project-based course: we go through all the steps of creating a prototype from start to finish, using all the tools and features currently available in Adobe XD. You can complete the course in less than a day, plus all project files and fonts are included.

    Suggested Solutions

    I will show you how to create a ASP.NET Captcha control without using any HTTP HANDELRS or what so ever. you can easily plug it into your web pages. For Example a = 2 + 3 (where 2 and 3 are 2 random numbers) Session("Answer") = 5 then we…
    SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

    760 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