3 Replies Latest reply on Oct 24, 2006 6:40 AM by Dan Bracuk

    Selecting Certain Parts of a Value

      I have attached the code I am using to test this out and make sure it works before implementing it. What I have is a database field which stores the date and time that they select. It keeps it in the form of yyyy-mm-dd hh:mm:ss. I want to pull all of those out to cfset variables so it would go something like...
      <cfset year = "the yyyy value">
      <cfset month = "the mm value">
      and so on...

      However, with the attached code, I am getting everything past the '-'. So if in the database it was 2006-10-8 10:40:23, it is showing 8 10:40:23. I want it to be just the 8.

      My other problem is how to get the reast of the values out, and set all those different parts of the time to the different variables with the fucntions I do not know how to use:(. Any help would be great!