Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default retrieving the day of the year

that's possible, Mike, but I'm not sure. i switched the rows with the
columns, so that the day of the year would go down the page instead of
across, and i get the same error.

Thanks for all the help so far. Apologies, should have told people that i'm
not just retrieving these date records, but pasting them into a kind of
calendar where each column corresponds to a day. as it's set up, it retrieves
the task assigned date as the day of the month, but i would like to have it
retreive the day of the year instead. instead of a monthly layout, i would
like a yearly layout.


"Mike" wrote:

Dave I think for what you are doing the day of the year if possiable will not
work
because you will run out of columns and will get that error

"DaveMZ" wrote:

Hello, i'm wondering if anyone can help me on this.

instead of retrieving the day of the month from an Access tasks table:

st = DatePart("d", rs.Fields("tasks.task_ass_date"))
nxt = DatePart("d", rs.Fields("tasks.task_ass_date")) + 1
due = DatePart("d", rs.Fields("task_ddate"))

I would like to retrieve the day of the year:

st = DatePart("y", rs.Fields("tasks.task_ass_date"))
nxt = DatePart("y", rs.Fields("tasks.task_ass_date")) + 1
due = DatePart("y", rs.Fields("task_ddate"))

but it gives me a 1004 "application defined error."

Is this possible to do using DatePart?

Thanks

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
convert day of year to numeric value format year+day in 4 digits Kaaren Excel Worksheet Functions 3 February 7th 09 08:37 PM
How do I crate a function for week of year + year in same cell. patty ann Excel Worksheet Functions 1 March 16th 08 06:34 PM
Combination Graph with current year and prior year sales JanW Charts and Charting in Excel 2 April 5th 07 09:20 PM
how to calculate $1000/year at 5% for 25 years showing each year HELP! Setting up and Configuration of Excel 0 July 25th 06 12:58 AM
How to compare current year to prior year in bar chart? substring Charts and Charting in Excel 4 May 12th 05 07:04 PM


All times are GMT +1. The time now is 08:31 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"