A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Removing leading characters from word field



 
 
Thread Tools Display Modes
  #1  
Old May 3rd, 2004, 10:54 AM
Peter Wilde
external usenet poster
 
Posts: n/a
Default Removing leading characters from word field

I'm creating a mail merge using data extracted from a
DBISAM database. One field in the database is a TimeStamp
which returns the date and time as follows '30/12/2003
9:30:00 AM' In my mail merge letter I need to include the
time only and would like to strip the date from the
beginning of the field. Microsoft SQL Query does not
allow me to use the substring command. Is there a solution
  #2  
Old May 3rd, 2004, 11:50 AM
macropod
external usenet poster
 
Posts: n/a
Default Removing leading characters from word field

Hi Peter,

You can control this in Word by adding a date & time picture switch to your
mergefield. To do this, select the field and press Shift-F9. Your field
should look something like:
{MERGEFIELD TimeStamp}
Edit the field, by adding: \@ "hh:mm:ss" after the source data name, so that
the field looks like:
{MERGEFIELD TimeStamp \@ "hh:mm:ss"}

Alternatively, if TimeStamp can exceed 24 hours, change the picture switch
to \@ "HH:mm:ss"

Cheers


"Peter Wilde" wrote in message
...
I'm creating a mail merge using data extracted from a
DBISAM database. One field in the database is a TimeStamp
which returns the date and time as follows '30/12/2003
9:30:00 AM' In my mail merge letter I need to include the
time only and would like to strip the date from the
beginning of the field. Microsoft SQL Query does not
allow me to use the substring command. Is there a solution



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.627 / Virus Database: 402 - Release Date: 16/03/2004


  #3  
Old May 4th, 2004, 12:01 PM
Peter Wilde
external usenet poster
 
Posts: n/a
Default Removing leading characters from word field

Dear Macropod,

You're a genius! I spent 2 hours trying to solve this
problem and you've given me the answer in 30 sec. Thanks.

Peter Wilde
-----Original Message-----
Hi Peter,

You can control this in Word by adding a date & time

picture switch to your
mergefield. To do this, select the field and press Shift-

F9. Your field
should look something like:
{MERGEFIELD TimeStamp}
Edit the field, by adding: \@ "hh:mm:ss" after the

source data name, so that
the field looks like:
{MERGEFIELD TimeStamp \@ "hh:mm:ss"}

Alternatively, if TimeStamp can exceed 24 hours, change

the picture switch
to \@ "HH:mm:ss"

Cheers


"Peter Wilde" wrote in message
...
I'm creating a mail merge using data extracted from a
DBISAM database. One field in the database is a

TimeStamp
which returns the date and time as follows '30/12/2003
9:30:00 AM' In my mail merge letter I need to include

the
time only and would like to strip the date from the
beginning of the field. Microsoft SQL Query does not
allow me to use the substring command. Is there a

solution


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system

(http://www.grisoft.com).
Version: 6.0.627 / Virus Database: 402 - Release Date:

16/03/2004


.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:36 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.