473,837 Members | 1,458 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Export to word date format

jpr
Friend, I am using a code to export data from a table to a word
document using bookmarks and have a problem with a date format.
When I export a field that is a mm/dd, in my word doc it shows up with
the format mm/dd/yyyy. Is there a way I can export to show the format
mm/yyyy?

This is the code:

objWord.ActiveD ocument.Bookmar ks("purgedate") .Select
If Err.Number = 0 Then
objWord.Selecti on.Text = Me.purgedate
Else
Err.Number = 0
End If

Any help?

Apr 19 '06 #1
2 2265
jpr wrote:
Friend, I am using a code to export data from a table to a word
document using bookmarks and have a problem with a date format.
When I export a field that is a mm/dd, in my word doc it shows up with
the format mm/dd/yyyy. Is there a way I can export to show the format
mm/yyyy?

This is the code:

objWord.ActiveD ocument.Bookmar ks("purgedate") .Select
If Err.Number = 0 Then
objWord.Selecti on.Text = Me.purgedate
Else
Err.Number = 0
End If

Any help?


objWord.Selecti on.Text = Format(Me.purge date,"mm/yy")
Apr 19 '06 #2
jpr
thanks. works fine.

Apr 19 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
5040
by: James Foreman | last post by:
Looking at the documentation on EXPORT, when exporting a date column it will automatically use yyyymmdd. One could choose to use ISO format, but unfortunately the client I'm exporting to can't deal with this and will only accept dd/mm/yyyy. Undaunted, I find that one can set the format when exporting a timestamp. So I thought of casting the date to a timestamp and then exporting with timestamp format set to dd/mm/yyyy. But one isn't...
2
11531
by: hikums | last post by:
Hello, If I export a file containing date field, export to "/james/j.txt" of DEL select a1,adate from a The date is represented in YYYY/MM/DD format as expected. Output I need is to be in "yyyymmdd" without delimiter. MODIFIED BY DATESISO option has a delimiter.
1
2143
by: fresh | last post by:
I have a database that I periodically export to a text file for a Word mail merge. I have a query that finds all of the records with a null export date and a query that updates the export date to now(). I have a macro that runs the first query, uses TransferText to send it to a file, then runs the update query. However, the file name in TransferText is "hard wired" so whatever was there before gets written over. Is there a way to...
2
4710
by: PerryC | last post by:
Is there a way to export an MS Access Report to Word/Excel that looks EXACTLY like it appears in Access? When I export to Excel, only certain data appears, titles, headings... all missing. The format is not aligned... When export to Word, all my lines (table lines) are gone, making it hard to read. Thanks. Perry
1
2174
by: Danny Ni | last post by:
Hi, Our company has a pretty large Intranet application, it has about 200 reports that mostly utilize xml and xsl to generate HTML format. We like another option to do the reporting, specifically we desire a GUI interface to design the reports and the outputs can be exported to pdf, Excel and highly desirable MS Word documents. I know Crystal reporter and MS Reporting service can export to pdf and Excel, not sure about Word.
1
1889
by: Gilz | last post by:
Hi I am having trouble with the transfertext acexportdelim function. I have written several routines that export queries with date fields. I have put format statements in the download queries as so that the data is exported as dd/mm/yy. Every time i run this it exports the dates as dd/mm/yy nn:hh:ss i really don't understand why.
4
2921
by: Joe Schmo | last post by:
Is there any way to export an Access Report, including the format, into a Word document - other than printing to a PDF.
5
3449
by: JHNielson | last post by:
I have a somewhat simple question, but have been baffled by it for a while, and now I'm on a tight deadline - have to get it done within 24 hours. I am trying to export a set of files to my hard drive to then later be FTPd to a server. the file format should be "TITLE.yyyymmdd" where yymmdd is the date code for when the files are created. The files can't be .txt. But when I run the files as ".txt" the code runs just fine. when I...
2
3549
OuTCasT
by: OuTCasT | last post by:
Hi im using this code to export appointments from a scheduler to outlook iCal file. The date doesnt pull through correctly Private Function GetAsTwoDigit(ByVal val As String) As String
0
9843
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9683
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10882
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
7005
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5670
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5851
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4476
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4045
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3126
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.