How to use "publish from" field in event webpart to publish the event according to server date

sarathlal s asked on March 24, 2014 23:35

Hi,

I need to publish a specific event in a particular time. I found publish from field in event document. But how can i use this in Where condition? Please give the complete syantax and procedure. The forum is not helpful. It saying only how to take server date in sql server not how to use in web part where condition.

Regards,

Sarathlal

Recent Answers


Brenden Kehren answered on March 25, 2014 07:27

Instead of using GETDATE() from SQL Server you can use a macro {% CurrentDateTime%} which will return the server datetime value.

1 votesVote for this answer Mark as a Correct answer

sarathlal s answered on March 25, 2014 07:37

How can i check this macro with "Publish from" field in event. I used Publish from>= {% CurrentDateTime%}. But it returns error

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on March 25, 2014 09:37

You need to use this macro in the WHERE clause in your Repeater or other listing web part, not in the actual document itself. The document publish from/to should have actual dates in them.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.