Ok.
Let's assume I have a GBM without drift, i.e. [$]dS_t = \sigma S_t dW_t[$]. Assume some level [$]B>S_{t_0}[$]. Define [$]M^+=max_{0\leq s \leq t} S_t[$]. With the help of some textbook, I could figure out that [$]E(\tau<t) = P(M^+ \geq B) = 1 + e^{2\alpha b} N(\frac{-b-\alpha t}{\sqrt{t}}) - N(\frac{b-\alpha t}{\sqrt{t}}) [$], where [$]\tau[$] is the first passage time, [$]b = log(B/S_{t_0})/\sigma[$] and [$]\alpha = -0.5 \sigma[$].
Next, following the advise from Alan, I take the derivative of [$]E(\tau<t)[$] w.r.t. to [$]t[$] and compute [$]\int_0^T t f(t) dt[$].
To simplify matters, I have looked at the term [$]N(\frac{b-\alpha t}{\sqrt{t}})[$] in isolation. Using differentiation under the integral sign, I obtained [$]g(t) =\frac{d N(\frac{b-\alpha t}{\sqrt{t}})}{dt} = -\frac{(b-\alpha t)}{2 \sqrt{2\pi} t \sqrt{t}} e^{-0.5 \frac{(b-\alpha t)^2}{t}}[$]. The equation I have put previously is simply the integral over the product [$]t g(t)[$].
@ Alan: I guess I could e.g. also use the 'sym' toolbox of Matlab. I don't think though I'd learn anything that way.
-Differentiate and combine both the N( ) terms.
-Expand the quadratic argument of the exponential, extracting the term independent of t from the integral.
-At this point, I believe you'll find it indeed reduces to exactly the integral I posted. Then, it comes down to evaluating that integral.
If you can't get Matlab to do it, and don't want to buy Mathematica, and can't do it yourself, and nobody on the board will do it for you -- I guess you are stuck.