Ordinal Date (only month/day)


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 6 of 6

Thread: Ordinal Date (only month/day)

  1. #1
    Join Date
    Apr 2009
    Posts
    10

    Ordinal Date (only month/day)

    How can I create a ordinal date just using month/day only?

    All the examples I see have month,date,and year.

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    You can't. A date consists of a year, a month and a day. Can you provide more details about why you want to do this?
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  3. #3
    Join Date
    Mar 2009
    Location
    Italy - Breganze (VI)
    Posts
    120
    A Date match a unique Time event.
    Therefore a field Date (DateTime) is really compose by :

    Month + Day + Year + Hour + Minute + Second

    You can decide to use DateTime data type, but to show only part of it, using related functions like Format(), DatePart(), ecc...

    If you want manage and store only Month and Year, then you use a DateTime field type.

    You must store the month/year in a TEXT data type.

    HTH

  4. #4
    Join Date
    Apr 2009
    Posts
    10
    They are trying to make a small footprint date. (it wasnt my idea)

    This is what im trying to create. A program that will write this easily. I know it can be done

    http://www.fs.fed.us/raws/book/julian.shtml

  5. #5
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    So basically you are just looking for the day of the year, right.

    (i.e., 4/9 = the 99th day of the year) Try this
    Code:
    Dim intDayOfYear As Integer
    intDayOfYear = DatePart("y", Now)
    Msgbox intDayOfYear
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

  6. #6
    Join Date
    Apr 2009
    Posts
    10
    Quote Originally Posted by Hack View Post
    So basically you are just looking for the day of the year, right.

    (i.e., 4/9 = the 99th day of the year) Try this
    Code:
    Dim intDayOfYear As Integer
    intDayOfYear = DatePart("y", Now)
    Msgbox intDayOfYear


    Thats the one... Thanks!!!!

Similar Threads

  1. Date comparison
    By Rageagainst20 in forum Java
    Replies: 2
    Last Post: 12-19-2007, 11:19 AM
  2. Query a date from database
    By matrik02 in forum VB Classic
    Replies: 0
    Last Post: 05-11-2007, 12:33 AM
  3. JAVA Date Utility Tutorial
    By hemanthjava in forum Java
    Replies: 0
    Last Post: 07-05-2006, 10:08 PM
  4. Replies: 1
    Last Post: 01-24-2003, 10:10 AM
  5. For any JDBC: wrap Date inside String
    By Fabio Luis De Paoli in forum Java
    Replies: 0
    Last Post: 03-03-2001, 01:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center