Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-30-2024, 04:55 PM
aturcan aturcan is offline Convert data from string to date Windows 11 Convert data from string to date Office 2021
Novice
Convert data from string to date
 
Join Date: Sep 2024
Posts: 2
aturcan is on a distinguished road
Default Convert data from string to date

Hi. I have a data source that cannot be adjusted. A field that is supposed to be a date field is actually pushed into word a string. So my mail merge doesn't see it a date source and thus doesn't format it using the \@ switch.

For example, I have "2/1/2025" coming into Word through a a MailMerge field. But it's actually a string piece of data, not a date.

How do I convert it into a Word date data field?



Thank you.
Reply With Quote
  #2  
Old 09-30-2024, 07:02 PM
macropod's Avatar
macropod macropod is offline Convert data from string to date Windows 10 Convert data from string to date Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,363
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

It shouldn't matter whether the data are coming through as strings - the date field switches (e.g. \@ "DDD D MMMM YYYY") should still be able to provide the required formatting - you don't need to convert the data to a Word DATE field (which wouldn't be possible anyway).
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 10-02-2024, 10:44 AM
aturcan aturcan is offline Convert data from string to date Windows 11 Convert data from string to date Office 2021
Novice
Convert data from string to date
 
Join Date: Sep 2024
Posts: 2
aturcan is on a distinguished road
Default

Thank you for your input. Do you know what could be causing it to not work then? The data coming in is 2/1/2025 and none of the date switches work with it.
Reply With Quote
  #4  
Old 10-02-2024, 02:39 PM
macropod's Avatar
macropod macropod is offline Convert data from string to date Windows 10 Convert data from string to date Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,363
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Without seeing some sample data and the mailmerge fields you're processing it with, I can't provide further advice.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert data from string to date Reading date from string ArviLaanemets Excel Programming 3 08-28-2024 07:19 AM
Date formatting on String field neubs007 Mail Merge 1 12-13-2021 10:12 PM
Extracting date, month & year from a text string without using date format Help Haha88 Excel 5 08-06-2021 01:19 PM
Microsoft Excel to extract date from another string Rajeshwar Excel 1 10-26-2016 09:57 AM
Convert data from string to date Convert numbers to a specific text string francis Excel 1 10-06-2011 01:43 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:42 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft