convert dates serial
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Convert dates to Serial

Convert dates to Serial

resolvedResolved · Low Priority · Version 2007

replyReply Fri 10 Jun 2011, 11:21Delegate Pedro said...

Pedro has attended:
Excel VBA Intro Intermediate course

Convert dates to Serial

Hello,

The Question:
How can I convert a date stored as string into a serial format?


Why I need it:
I found that to update the values of a pivot according to a date using VBA the date have to be in serial format.

I use this code to do that:
Workbooks(Name).Sheets("Zara").Range("G28").Value = PT.GetPivotData("Sum of Average", "Company", 1, "YearMonth", pivot_date).Value


I got the date as a string in a cell and I tried to conver it into serial using the Format function with 'c' but it didn't work

pivot_date=Format(str_date, c)

There is other way to convert String Into Serial(date)?

Thanks,
Pedro F. Pardo

For upcoming training course dates see: Pricing & availability

replyReply Thu 23 Jun 2011, 13:39Trainer Anthony said...

RE: Convert dates to Serial

Hi Pedro, I think I answered this in a separate query reply. Do you have what you need to do this?

Anthony

Wed 29 Jun 2011: Automatically marked as resolved.

 

Please browse our web site to find out more about
excel/course/london and other Microsoft training courses.

Excel tip:

Rotating Text in an Excel 2010 Worksheet

Maybe you want to draw attention to certain text or you just simply want to make your worksheet look more exciting!

One of the things you might consider is, rotating the text in a particular cell or set of cells.

1) Select a cell you would like to rotate
2) Click the ''Home'' tab in the Ribbon
3) Click ''orientation'' in the ''Alignment'' section
4) A pop up menu will appear with a few choices, if you want to decide yourself how many degrees to rotate the text, then click ''Format Cell Alignment.''

View all Excel hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard