How to insert date values in yyyy format in Ignite table?

classic Classic list List threaded Threaded
2 messages Options
Shravya Nethula Shravya Nethula
Reply | Threaded
Open this post in threaded view
|

How to insert date values in yyyy format in Ignite table?

Hi,

To insert date values in Ignite table, the column datatype is given as
"date" and values are given in the Ignite supported format "yyyy-MM-dd".

But how can the date values be inserted in "yyyy" format in Ignite table?
Is there any possibility to insert values in this format?

Regards,
Shravya Nethula.




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Sergey Antonov Sergey Antonov
Reply | Threaded
Open this post in threaded view
|

Re: How to insert date values in yyyy format in Ignite table?

Hi!

You can insert date with default month and day, such as yyyy-01-01. I recomend to use SMALLINT, if you need to store years in Apache Ignite.
FYI: Apache Ignite recomend [1] to use Timestamp [2] instead of Date datatype.  
 



сб, 29 июн. 2019 г. в 13:57, Shravya Nethula <[hidden email]>:
Hi,

To insert date values in Ignite table, the column datatype is given as
"date" and values are given in the Ignite supported format "yyyy-MM-dd".

But how can the date values be inserted in "yyyy" format in Ignite table?
Is there any possibility to insert values in this format?

Regards,
Shravya Nethula.




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


--
BR, Sergey Antonov