Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

convert dates serial

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

Convert dates to Serial

ResolvedVersion 2007

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

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.

 

Training courses

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Excel tip:

Paste with Live Preview in Excel 2010

Did you know you can preview what you are about to paste? Here's how to do it.

Copy what you are about to paste
Position the cursor where you want to paste
Right click to display the shortcut menu
Place the cursor over the Paste Options and this will give you a preview of the what you are about to paste.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.1 secs.