Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

United Kingdom
2 Posts

Posted - 10/10/2013 :  06:49:24  Show Profile  Reply with Quote

I try and dipslay date as a header on the top of my page. It needs to be in the format YYYYMMDD_HHMMSS.

I use expression =FormatDateTime(NOW(),'%Y%m%d_%H%i%s')

but recieve error
The Value expression for the textrun ‘ID3.Paragraphs[0].TextRuns[0]’ contains an error: [BC30201] Expression expected.

If i use =FormatDateTime(NOW()) the date displays but not in the correct format.

Can someone please help where im going wrong in the date format expression


Flowing Fount of Yak Knowledge

8781 Posts

Posted - 10/10/2013 :  08:11:15  Show Profile  Visit webfred's Homepage  Reply with Quote
looks like this isn't a T-SQL problem!?

Too old to Rock'n'Roll too young to die.
Go to Top of Page

Very Important crosS Applying yaK Herder

52326 Posts

Posted - 10/10/2013 :  08:33:27  Show Profile  Reply with Quote
Should be this


SQL Server MVP
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000