无法获取smalldate值

时间:2019-03-13 15:39:24

标签: php sql odbc sybase

我正在尝试使用php和odbc从Sybase视图打印值。我得到了所有打印出来的值,除了smalldate值。

有人知道为什么会这样吗?

我正在使用代码:

string channelToken = null;

if ((activity.ChannelId.Equals("skype", StringComparison.InvariantCultureIgnoreCase)) 
{
    var credentials = new MicrosoftAppCredentials(youBotAppId, yourBotAppPassword);

    channelToken = await credentials.GetTokenAsync();
}

foreach (var file in activity.Attachments)
{
    // Determine where the file is hosted.
    var remoteFileUrl = file.ContentUrl;

    // Save the attachment to the system temp directory.
    var localFileName = Path.Combine(Path.GetTempPath(), file.Name)

    // Download the actual attachment
    using (var webClient = new WebClient())
    {
        if (!string.IsNullOrWhiteSpace(channelToken))
        {
            webClient.DefaultRequestHeaders.Authorization = 
                new AuthenticationHeaderValue("Bearer", channelToken);
        }

        webClient.DownloadFile(remoteFileUrl, localFileName);
    }

1 个答案:

答案 0 :(得分:0)

我在sql上转换为varchar

$query = odbc_exec($db, 'select Convert(varchar(20),DataFim,103) as DataFim from GP_Vw_Cons_Faltas where Codigo=5410
');