Processing Ajax...

Title

Message

Confirm

Confirm

Confirm

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure?
Save up to 50% on our desktop apps during our Year End Sale!Save up to 50% on our desktop apps during our Year End Sale, including DisplayFusion, ClipboardFusion, FileSeek, LogFusion, TrayStatus, and VoiceBot!Save up to 50% on our desktop apps during our Year End Sale!

Paste Date Only

Description
Takes a date time value and pastes only the date. The original date time value stays on the clipboard.
Language
VB.net
Minimum Version
Created By
wooster11
Contributors
-
Date Created
Aug 19, 2014
Date Last Modified
Aug 19, 2014

Macro Code

Imports System
Imports System.Windows.Forms
Imports Microsoft.VisualBasic

Public Class ClipboardFusionHelper

    Public Shared Function ProcessText(text As String) As String
        If IsDate(text) Then
          Dim x As DateTime = CDate(text)
            BFS.Clipboard.PasteText(x.ToString("yyyy-MM-dd"))
        Else
          MessageBox.Show("Clipboard text is invalid.  It must be a date", "Paste Date Only", MessageBoxButtons.OK, MessageBoxIcon.Information)
        End If

        Return text
    End Function

End Class