Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all!
I work with OLE, and want to do this: somecell.value = some date (which i have in mm.dd.yyyy format numberformat = "yyyy" // year only nextcell.value = previous cell numberformat = "mmm" // month as name I have tried this, but it does not work: $WB-Sheets(1)-Cells($excel_index,1)-NumberFormat="mm.dd.yyyy"; $WB-Sheets(1)-Cells($excel_index,1)- Value=GetMyDateFormat(odbc_result($result,3)); $WB-Sheets(1)-Cells($excel_index,1)-NumberFormat="yyyy"; $WB-Sheets(1)-Cells($excel_index,2)-NumberFormat="mm.dd.yyyy"; $WB-Sheets(1)-Cells($excel_index,2)- Value=GetMyDateFormat(odbc_result($result,3)); $WB-Sheets(1)-Cells($excel_index,2)-NumberFormat="mmm"; GetMyDateFormat returns the date in "mm.dd.yyyy" format. Is there an Excel guru here? Eventually I'd like to add a date and format it as yyyy/mm BR Sonnich |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I repost this in hope of just getting any answer....
also, how come, that the format #0.00 only works sometimes? It should be the same always On Mar 30, 3:56 pm, "jodleren" wrote: Hi all! I work with OLE, and want to do this: somecell.value = some date (which i have in mm.dd.yyyy format numberformat = "yyyy" // year only nextcell.value = previous cell numberformat = "mmm" // month as name I have tried this, but it does not work: $WB-Sheets(1)-Cells($excel_index,1)-NumberFormat="mm.dd.yyyy"; $WB-Sheets(1)-Cells($excel_index,1)-Value=GetMyDateFormat(odbc_result($result,3)); $WB-Sheets(1)-Cells($excel_index,1)-NumberFormat="yyyy"; $WB-Sheets(1)-Cells($excel_index,2)-NumberFormat="mm.dd.yyyy"; $WB-Sheets(1)-Cells($excel_index,2)-Value=GetMyDateFormat(odbc_result($result,3)); $WB-Sheets(1)-Cells($excel_index,2)-NumberFormat="mmm"; GetMyDateFormat returns the date in "mm.dd.yyyy" format. Is there an Excel guru here? Eventually I'd like to add a date and format it as yyyy/mm BRSonnich |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Conditional Formattting | Excel Discussion (Misc queries) | |||
Conditional formattting & CountColorCells | Excel Discussion (Misc queries) | |||
Formattting Text | Excel Worksheet Functions | |||
Excel Formula to calulate number of days passed from date to date | Excel Discussion (Misc queries) | |||
Formattting Fractions | Excel Discussion (Misc queries) |