• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 755
  • Last Modified:

Using DoDateTime

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?
1 Solution
Ryan ChongCommented:
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) %>
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now