Date Output Format Differences - VisualCron - Forum

Community forum

Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
View
Go to last post Go to first unread
Offline Librus Prime  
#1 Posted : Friday, December 6, 2019 6:35:50 PM(UTC)
Librus Prime

Rank: Paid support

Joined: 11/6/2019(UTC)
Posts: 5
Canada
Location: Winnipeg, Manitoba

Thanks: 1 times
I run a stored proc on 2 Hosts.
Host 1 is via sqlcmd
Host 2 is via VisualCron

I have output difference (below):
Host 1 Output = 2019-11-15
Host 2 Output = 2019-11-15 12:00:00 AM

Note:
1 - Region Settings are the same on Host 1 and Host 2
2 - The stored proc casts as "date" and not "date/time"
Example: cast(EndingDate as date )[ EndingDate],

Why are the outputs different?
How can I ensure that VisualCron outputs Date and not Date/Time ?

R

Edited by user Friday, December 6, 2019 8:16:01 PM(UTC)  | Reason: Not specified

Offline Librus Prime  
#2 Posted : Monday, December 9, 2019 6:45:46 PM(UTC)
Librus Prime

Rank: Paid support

Joined: 11/6/2019(UTC)
Posts: 5
Canada
Location: Winnipeg, Manitoba

Thanks: 1 times
Is there a typical response time for "Rank: Paid Support" ?
Offline Support  
#3 Posted : Monday, December 9, 2019 8:13:29 PM(UTC)
Support

Rank: Official support

Joined: 2/23/2008(UTC)
Posts: 11,258

Thanks: 877 times
Was thanked: 450 time(s) in 427 post(s)
Hi, this post was a duplicate to the email we answered. As mentioned first choice is to alter the query to the exact format you need. Please note that this is not a question directly related to VisualCron functionality but rather T-SQL question.


Here is some information for those that are interested in SQL date formatting:

Code:
SELECT convert(varchar, getdate(), 100) -- mon dd yyyy hh:mmAM

SELECT convert(varchar, getdate(), 101) -- mm/dd/yyyy – 10/02/2008                  

SELECT convert(varchar, getdate(), 102) -- yyyy.mm.dd – 2008.10.02           

SELECT convert(varchar, getdate(), 103) -- dd/mm/yyyy

SELECT convert(varchar, getdate(), 104) -- dd.mm.yyyy

SELECT convert(varchar, getdate(), 105) -- dd-mm-yyyy

SELECT convert(varchar, getdate(), 106) -- dd mon yyyy

SELECT convert(varchar, getdate(), 107) -- mon dd, yyyy

SELECT convert(varchar, getdate(), 108) -- hh:mm:ss

SELECT convert(varchar, getdate(), 109) -- mon dd yyyy hh:mm:ss:mmmAM (or PM)

SELECT convert(varchar, getdate(), 110) -- mm-dd-yyyy

SELECT convert(varchar, getdate(), 111) -- yyyy/mm/dd

SELECT convert(varchar, getdate(), 112) -- yyyymmdd

SELECT convert(varchar, getdate(), 113) -- dd mon yyyy hh:mm:ss:mmm

SELECT convert(varchar, getdate(), 114) -- hh:mm:ss:mmm(24h)

SELECT convert(varchar, getdate(), 120) -- yyyy-mm-dd hh:mm:ss(24h)

SELECT convert(varchar, getdate(), 121) -- yyyy-mm-dd hh:mm:ss.mmm

SELECT convert(varchar, getdate(), 126) -- yyyy-mm-ddThh:mm:ss.mmm


Henrik
Support
http://www.visualcron.com
Please like VisualCron on facebook!
Users browsing this topic
Guest
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Scroll to Top