12-12-2006, 03:30 PM
is there a way to get the decimal (1-366) value of the date and then convert it back to a date in different formats?
date decimal back to date
|
12-12-2006, 03:30 PM
is there a way to get the decimal (1-366) value of the date and then convert it back to a date in different formats?
12-12-2006, 03:43 PM
What formats?
12-12-2006, 03:46 PM
well, it's really more of a yak shaving function.
i have a directory of files that have a 6 digit YYMMDD*x*.??? name format and i want to create a dialog that'll ask for a "start" and "end" date of the files to pull. So, i thought if i took the dates, from the user input, and got the decimal numbers of each date, then took all the numbers between (and including) and converted them back to dates in YYMMDD format and fed them into a dictionary i could compare it to the array i built with the "YYMMDD" portion of the file name and pull only the files that have the dates in the filenames i need. make any sense?
12-12-2006, 04:21 PM
If you'll get only 1-366, how you'll know YY?
12-12-2006, 04:37 PM
good question. i can pull that from the user input and do some hoop-jumping based on how the numbers look.
if from date =277 then 1-276 equals the next year. there may actually be "no chance" that they could pull over 12 months of data (files), so i won't have to make the multi-year logic.
12-12-2006, 04:55 PM
12-12-2006, 05:00 PM
thanks.
im getting this error though Error (RT) in Macro2: 0x80020005, Type mismatch.
12-12-2006, 05:02 PM
Maybe "%Y.01.01" is not recognized in your locale. Try "01/01/%Y".
12-12-2006, 05:08 PM
crazy americans and their date formats!
"01/01/%Y" thanks!!
07-16-2008, 10:14 PM
DELETED...didn't read post above clearly enough!!
07-16-2008, 10:20 PM
07-16-2008, 10:26 PM
Function DateFun
Taking on Quick Macros one day at a time
|
« Next Oldest | Next Newest »
|