Skip to content

Instantly share code, notes, and snippets.

View belenaj's full-sized avatar

Jorge belenaj

View GitHub Profile
@belenaj
belenaj / SSIS Utilities
Last active August 3, 2018 11:49
SSIS Utilities
.
@belenaj
belenaj / SSIS.DateToYYYYMMDDString.md
Last active November 22, 2017 13:08
SSIS | Date to YYYYMMDD String #SSIS #Date #String #YYYYMMDD

SSIS | Date to YYYYMMDD String

This expression will convert a datetime field in format YYYYMMDD

i.e. with <datetime> ='2017-01-03 13:18:13.667' it will return 20170103 [String (8)]

Just replace for your field name

(DT_WSTR, 8)REPLACE((DT_WSTR, 10)(DT_DBDATE),"-","")
@belenaj
belenaj / SSIS.GenerateDatekeyInt.md
Last active November 22, 2017 13:07
SSIS | Generate Datekey (int) from Date field #SSIS #date #YYYYMMDD

SSIS | Generate Datekey (int) from Date field

This expression will extract the date from the field in format YYYYMMDD and it will be converted to integer

i.e. '2017-01-03 13:18:13.667' --> 20170103 (int) Just replace for your field name

<?xml version=”1.0" encoding=”UTF-8"?>
<viewentries timestamp=”20171026T092215,59Z”>
<item position=”1" >
<entrydata name=”OrderDate”>
<datetime dst=”true”>20171026T102513,86+02</datetime></entrydata>
<entrydata name=”Country”>
<text>Spain</text></entrydata>
</item>
<item position=”2" >
<entrydata name=”OrderDate”>
#!/bin/sh
#
# Copyright
#
# Check for the correct # of arguments:
# Use this syntax or use: if [ $# -lt 3 ]
echo "$# arguments were supplied."
if [ $# -lt 3 ]