sona11

sona11

How can I apply a converted date to a SQL Server variable?

How can I apply a modified date and time to a variable? This is what I get when I execute the following query in SQL Server Mgmt Studio:

SELECT CONVERT(varchar(15), CAST(GETDATE() AS TIME), 100) 

I have a variable I need to assign to, such.

DECLARE @mytime AS VARCHAR;

SET @mytime = SELECT CONVERT(varchar(15),CAST(GETDATE() AS TIME),100) --incorrect syntax
SELECT @mytime

Where Next?

Popular General Dev topics Top

Jase
Do they publish their stacks or is it mostly a case of guesswork? Twitter facebook instagram snapchat tiktok google et all. Used to be we...
New
Girtyp
Hi everyone. Getting right to my question, I have recently thought about implementing payment by installment feature in my website. Who k...
New
harwind
Consider the following bits of code: void foo(const int i) // First foo { std::cout << "First " << i << endl; } vo...
New
PaulMartin
Hey everyone! Do you have any tips or free resources that can help me learn Rspec? Although I know how to write some Rspec, I’m not very...
New
harwind
Given an array of integers, find the length of the longest increasing subsequence. A subsequence is a sequence that can be derived from a...
New
harwind
I am working on a Python script, and you encounter an error related to the misuse of lists and tuples. Here’s a simplified version of you...
New
harwind
Hi, I’m now investigating the complexities of Python loops, specifically the contrast between for and while loops. However, I’ve had some...
New
harwind
Hi, Take a riveting look at exception handling in Java programming, including the complicated dance between try-catch blocks, checked an...
New
Tazmeen
Hello, I am new to this forum. Not really sure if this topic is relevant for this chat at all. I apologize if its not. I am trying to c...
New
GTX
Hello everyone! I am not a developer, just wanna know if it’s possible for someone with no skills to learn how to reverse hack my hackers.
New

Other popular topics Top

AstonJ
If it’s a mechanical keyboard, which switches do you have? Would you recommend it? Why? What will your next keyboard be? Pics always w...
New
AstonJ
poll poll Be sure to check out @Dusty’s article posted here: An Introduction to Alternative Keyboard Layouts It’s one of the best write-...
New
PragmaticBookshelf
Rust is an exciting new programming language combining the power of C with memory safety, fearless concurrency, and productivity boosters...
New
AstonJ
If you are experiencing Rails console using 100% CPU on your dev machine, then updating your development and test gems might fix the issu...
New
mafinar
Crystal recently reached version 1. I had been following it for awhile but never got to really learn it. Most languages I picked up out o...
New
First poster: joeb
The File System Access API with Origin Private File System. WebKit supports new API that makes it possible for web apps to create, open,...
New
husaindevelop
Inside our android webview app, we are trying to paste the copied content from another app eg (notes) using navigator.clipboard.readtext ...
New
PragmaticBookshelf
Develop, deploy, and debug BEAM applications using BEAMOps: a new paradigm that focuses on scalability, fault tolerance, and owning each ...
New
sir.laksmana_wenk
I’m able to do the “artistic” part of game-development; character designing/modeling, music, environment modeling, etc. However, I don’t...
New
Fl4m3Ph03n1x
Background Lately I am in a quest to find a good quality TTS ai generation tool to run locally in order to create audio for some videos I...
New